diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggPAM.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/classes/ElggPAM.php b/engine/classes/ElggPAM.php index 37436fba3..0681a909b 100644 --- a/engine/classes/ElggPAM.php +++ b/engine/classes/ElggPAM.php @@ -41,9 +41,14 @@ class ElggPAM { * @param array $credentials Credentials array dependant on policy type * @return bool */ - public function authenticate($credentials) { + public function authenticate($credentials = array()) { global $_PAM_HANDLERS; + if (!isset($_PAM_HANDLERS[$this->policy]) || + !is_array($_PAM_HANDLERS[$this->policy])) { + return false; + } + $authenticated = false; foreach ($_PAM_HANDLERS[$this->policy] as $k => $v) { |