mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:20:11 +01:00
added webui login debug info
This commit is contained in:
parent
6d3d61374c
commit
50b78e712f
@ -182,12 +182,16 @@ class ModelUserAuth extends Model {
|
|||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
foreach($e as $a) {
|
foreach($e as $a) {
|
||||||
|
syslog(LOG_INFO, "checking ldap entry dn: " . $a['dn'] . ", cn: " . $a['cn']);
|
||||||
|
|
||||||
foreach (array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup") as $mailattr) {
|
foreach (array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup") as $mailattr) {
|
||||||
if(isset($a[$mailattr])) {
|
if(isset($a[$mailattr])) {
|
||||||
|
|
||||||
if(is_array($a[$mailattr])) {
|
if(is_array($a[$mailattr])) {
|
||||||
for($i = 0; $i < $a[$mailattr]['count']; $i++) {
|
for($i = 0; $i < $a[$mailattr]['count']; $i++) {
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "checking entry: " . $a[$mailattr][$i]);
|
||||||
|
|
||||||
$a[$mailattr][$i] = strtolower($a[$mailattr][$i]);
|
$a[$mailattr][$i] = strtolower($a[$mailattr][$i]);
|
||||||
|
|
||||||
if(strchr($a[$mailattr][$i], '@')) {
|
if(strchr($a[$mailattr][$i], '@')) {
|
||||||
@ -202,6 +206,8 @@ class ModelUserAuth extends Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
syslog(LOG_INFO, "checking entry #2: " . $a[$mailattr]);
|
||||||
|
|
||||||
$email = strtolower(preg_replace("/^([\w]+)\:/i", "", $a[$mailattr]));
|
$email = strtolower(preg_replace("/^([\w]+)\:/i", "", $a[$mailattr]));
|
||||||
if(validemail($email) && !in_array($email, $data)) { array_push($data, $email); }
|
if(validemail($email) && !in_array($email, $data)) { array_push($data, $email); }
|
||||||
}
|
}
|
||||||
@ -370,6 +376,8 @@ class ModelUserAuth extends Model {
|
|||||||
|
|
||||||
$this->add_session_vars($a['cn'], $username, $emails, $role);
|
$this->add_session_vars($a['cn'], $username, $emails, $role);
|
||||||
|
|
||||||
|
$this->model_user_prefs->get_user_preferences($username);
|
||||||
|
|
||||||
AUDIT(ACTION_LOGIN, $username, '', '', 'successful auth against LDAP');
|
AUDIT(ACTION_LOGIN, $username, '', '', 'successful auth against LDAP');
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user