From 3048db0f3f1ade31d6f3a2cdd3268e978a3e3cf3 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Mon, 17 Sep 2012 17:41:15 -0400 Subject: Fixes #4861: allow lazy-loading for static method callbacks, allow more callables --- engine/classes/ElggPAM.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engine/classes/ElggPAM.php') diff --git a/engine/classes/ElggPAM.php b/engine/classes/ElggPAM.php index 0681a909b..f07095fc1 100644 --- a/engine/classes/ElggPAM.php +++ b/engine/classes/ElggPAM.php @@ -53,11 +53,17 @@ class ElggPAM { foreach ($_PAM_HANDLERS[$this->policy] as $k => $v) { $handler = $v->handler; + if (!is_callable($handler)) { + continue; + } + /* @var callable $handler */ + $importance = $v->importance; try { // Execute the handler - $result = $handler($credentials); + // @todo don't assume $handler is a global function + $result = call_user_func($handler, $credentials); if ($result) { $authenticated = true; } elseif ($result === false) { -- cgit v1.2.3