aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggPAM.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-04-16 11:52:37 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-04-16 11:52:37 -0400
commit309dff2bf948ab191ccb1e8d4a777e49ad498820 (patch)
tree813350181be64e239287c0bb587a3a49320a49b7 /engine/classes/ElggPAM.php
parent119ec1f1425ab77ed29c696d99c0c80df3886791 (diff)
parent2b2afd98c05139c1a5c25f1752e2bb412e26e335 (diff)
downloadelgg-309dff2bf948ab191ccb1e8d4a777e49ad498820.tar.gz
elgg-309dff2bf948ab191ccb1e8d4a777e49ad498820.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'engine/classes/ElggPAM.php')
-rw-r--r--engine/classes/ElggPAM.php7
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) {