Made groups work on OpenDirectory (Apple's OpenLDAP shipped with OS X Server),
which is like standard POSIX. Existing AD group support should also still work (but has not been tested as I don't have a working AD setup). Added support for the group check to the login code (which was still missing) Improved the user experience by only dumping a newly created user on the profile page when the e-mail address was missing.
This commit is contained in:
@@ -53,7 +53,7 @@ if (isset($_POST['check_ldap'])){
|
||||
$error=$me->check_ldap();
|
||||
if($error==1 && $username) {
|
||||
if ($me->ldap_bind_as($username,$_POST['PASSWORD'])){
|
||||
if($me->check_ldap_group_membership($username,$me->config['ld_group'])){
|
||||
if($me->check_ldap_group_membership($username,$_POST['USERNAME'])){
|
||||
$template->assign('LD_CHECK_LDAP','<p style="color:green;">Configuration LDAP OK : '.$username.'</p>');
|
||||
} else {
|
||||
$template->assign('LD_CHECK_LDAP','<p style="color:orange;">Credentials OK, Check GroupMembership for: '.$username.'</p>');
|
||||
|
||||
Reference in New Issue
Block a user