Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 999 → Rev 1000

/trunk/plugins/viathinksoft/publicPages/800_login_ldap/OIDplusPagePublicLoginLDAP.class.php
305,11 → 305,13
}
 
public function implementsFeature($id) {
if (strtolower($id) == '1.3.6.1.4.1.37476.2.5.2.3.5') return true; // alternativeLoginMethods
if (strtolower($id) == '1.3.6.1.4.1.37476.2.5.2.3.5') return true; // alternativeLoginMethods()
if (strtolower($id) == '1.3.6.1.4.1.37476.2.5.2.3.8') return true; // getNotifications()
return false;
}
 
public function alternativeLoginMethods() {
// Interface 1.3.6.1.4.1.37476.2.5.2.3.5
$logins = array();
if (OIDplus::baseConfig()->getValue('LDAP_ENABLED', false)) {
$logins[] = array(
320,4 → 322,19
}
return $logins;
}
 
public function getNotifications($user=null): array {
// Interface 1.3.6.1.4.1.37476.2.5.2.3.8
$notifications = array();
if ((!$user || ($user == 'admin')) && OIDplus::authUtils()->isAdminLoggedIn()) {
if (OIDplus::baseConfig()->getValue('LDAP_ENABLED', false)) {
if (!function_exists('ldap_connect')) {
$title = _L('LDAP Login');
$notifications[] = array('ERR', _L('OIDplus plugin "%1" is enabled, but required PHP extension "%2" is not installed.', $title, 'php_ldap'));
}
}
}
return $notifications;
}
 
}