Revert du lookup sur adresse mail

This commit is contained in:
Daniel Berteaud 2012-09-21 19:37:32 +02:00
parent 7802991e8a
commit 050f63759c
2 changed files with 4 additions and 16 deletions

View File

@ -17,14 +17,8 @@ if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERV
$result = ldap_search($link, USER_BASE, "uid=" . $uid);
$user = ldap_get_entries($link, $result);
if($user['count'] == 0) {
// Search for the mail address
$result = ldap_search($link, USER_BASE, "mail=" . $_SERVER['QUERY_STRING']);
$user = ldap_get_entries($link, $result);
$uid = $user[0]['uid'][0];
if($user['count'] != 1) {
// user not found or multiple result found
exit;
}
// user not found
exit;
}
$pref = FF_PREF;
// Don't lock pref if the user is member of some special groups

View File

@ -16,14 +16,8 @@ if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERV
$result = ldap_search($link, USER_BASE, "uid=" . $uid);
$user = ldap_get_entries($link, $result);
if($user['count'] == 0) {
// Search for the mail address
$result = ldap_search($link, USER_BASE, "mail=" . $_SERVER['QUERY_STRING']);
$user = ldap_get_entries($link, $result);
$uid = $user[0]['uid'][0];
if($user['count'] != 1) {
// user not found or multiple result found
exit;
}
// user not found
exit;
}
$pref = TB_PREF;
// Don't lock pref if the user is member of some special groups