Revert du lookup sur adresse mail

tags/0.2.21
Daniel Berteaud 12 years ago
parent 7802991e8a
commit 050f63759c
  1. 8
      root/usr/share/mozilla-mcd/firefox.php
  2. 8
      root/usr/share/mozilla-mcd/thunderbird.php

@ -17,15 +17,9 @@ if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERV
$result = ldap_search($link, USER_BASE, "uid=" . $uid); $result = ldap_search($link, USER_BASE, "uid=" . $uid);
$user = ldap_get_entries($link, $result); $user = ldap_get_entries($link, $result);
if($user['count'] == 0) { if($user['count'] == 0) {
// Search for the mail address // user not found
$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; exit;
} }
}
$pref = FF_PREF; $pref = FF_PREF;
// Don't lock pref if the user is member of some special groups // Don't lock pref if the user is member of some special groups
// regardless of the setting // regardless of the setting

@ -16,15 +16,9 @@ if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERV
$result = ldap_search($link, USER_BASE, "uid=" . $uid); $result = ldap_search($link, USER_BASE, "uid=" . $uid);
$user = ldap_get_entries($link, $result); $user = ldap_get_entries($link, $result);
if($user['count'] == 0) { if($user['count'] == 0) {
// Search for the mail address // user not found
$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; exit;
} }
}
$pref = TB_PREF; $pref = TB_PREF;
// Don't lock pref if the user is member of some special groups // Don't lock pref if the user is member of some special groups
// regardless of the setting // regardless of the setting

Loading…
Cancel
Save