summaryrefslogtreecommitdiff
path: root/plugins/LdapAuthorization
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-26 12:33:36 -0800
committerBrion Vibber <brion@pobox.com>2010-02-26 12:33:36 -0800
commit517fd54b6515375b075a5d7253a8b66e53785baa (patch)
tree56b7b0b6747a6c6d9d897ff38d02676c780bad0f /plugins/LdapAuthorization
parent8dfc8f1635940b096e7f4025e3aef0ca4f909eb2 (diff)
parenteb724bfdc85d0b50d6f5be60e1e11296ebe11247 (diff)
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/LdapAuthorization')
-rw-r--r--plugins/LdapAuthorization/LdapAuthorizationPlugin.php5
-rw-r--r--plugins/LdapAuthorization/README5
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php
index 7f48ce5e1..19aff42b8 100644
--- a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php
+++ b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php
@@ -167,7 +167,7 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
$ldap->setErrorHandling(PEAR_ERROR_RETURN);
$err=$ldap->bind();
if (Net_LDAP2::isError($err)) {
- common_log(LOG_WARNING, 'Could not connect to LDAP server: '.$err->getMessage());
+ throw new Exception('Could not connect to LDAP server: '.$err->getMessage());
return false;
}
if($config == null) $this->default_ldap=$ldap;
@@ -185,6 +185,9 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
if($ldap==null) {
$ldap = $this->ldap_get_connection();
}
+ if(! $ldap) {
+ throw new Exception("Could not connect to LDAP");
+ }
$filter = Net_LDAP2_Filter::create($this->attributes['username'], 'equals', $username);
$options = array(
'attributes' => $attributes
diff --git a/plugins/LdapAuthorization/README b/plugins/LdapAuthorization/README
index 44239d8e0..3a6d8d25e 100644
--- a/plugins/LdapAuthorization/README
+++ b/plugins/LdapAuthorization/README
@@ -11,7 +11,10 @@ You *cannot* use this plugin without the LDAP Authentication plugin
Settings
========
-provider_name*: name of the LDAP authentication provider that this plugin works with.
+provider_name*: This is a identifier designated to the connection.
+ It's how StatusNet will refer to the authentication source.
+ For the most part, any name can be used, so long as each authentication source has a different identifier.
+ In most cases there will be only one authentication source used.
authoritative (false): should this plugin be authoritative for
authorization?
uniqueMember_attribute ('uniqueMember')*: the attribute of a group