mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 20:10:11 +01:00
added custom func support to ldap auth as well
This commit is contained in:
parent
b992eb467d
commit
3668fcbb0f
@ -55,6 +55,8 @@ class ControllerLoginLogin extends Controller {
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
$data = $session->get("auth_data");
|
$data = $session->get("auth_data");
|
||||||
|
|
||||||
|
if(isset($data['username'])) {
|
||||||
$this->model_user_auth->apply_user_auth_session($data);
|
$this->model_user_auth->apply_user_auth_session($data);
|
||||||
$session->remove("auth_data");
|
$session->remove("auth_data");
|
||||||
|
|
||||||
@ -75,6 +77,7 @@ class ControllerLoginLogin extends Controller {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$this->model_user_auth->increment_failed_login_count($this->data['failed_login_count']);
|
$this->model_user_auth->increment_failed_login_count($this->data['failed_login_count']);
|
||||||
$this->data['failed_login_count']++;
|
$this->data['failed_login_count']++;
|
||||||
|
@ -41,7 +41,13 @@ class ModelUserAuth extends Model {
|
|||||||
|
|
||||||
if(ENABLE_LDAP_AUTH == 1) {
|
if(ENABLE_LDAP_AUTH == 1) {
|
||||||
$ok = $this->checkLoginAgainstLDAP($username, $password, $data);
|
$ok = $this->checkLoginAgainstLDAP($username, $password, $data);
|
||||||
if($ok == 1) { return $ok; }
|
if($ok == 1) {
|
||||||
|
if(CUSTOM_EMAIL_QUERY_FUNCTION && function_exists(CUSTOM_EMAIL_QUERY_FUNCTION)) {
|
||||||
|
call_user_func(CUSTOM_EMAIL_QUERY_FUNCTION, $username);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ok;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ENABLE_IMAP_AUTH == 1) {
|
if(ENABLE_IMAP_AUTH == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user