aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/pam.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-12-07 23:55:12 +0100
committerSem <sembrestels@riseup.net>2012-12-07 23:55:12 +0100
commit3ed289b03fa3d851fd7fffbc0441ebc9b5e98310 (patch)
treeb2c8d2d7f569f0e3e7bfa6711cef96f806aea9f1 /engine/lib/pam.php
parent2b2af5392f0daadc22a1db04aa17c17d4dd37c65 (diff)
parentccf7abb4b2b94781f9b67a6cf8798994aa1cca0d (diff)
downloadelgg-3ed289b03fa3d851fd7fffbc0441ebc9b5e98310.tar.gz
elgg-3ed289b03fa3d851fd7fffbc0441ebc9b5e98310.tar.bz2
Merge tag '1.8.11' of git://github.com/Elgg/Elgg
Elgg 1.8.11 release
Diffstat (limited to 'engine/lib/pam.php')
-rw-r--r--engine/lib/pam.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/lib/pam.php b/engine/lib/pam.php
index 4f9f44278..1c9c3bfe1 100644
--- a/engine/lib/pam.php
+++ b/engine/lib/pam.php
@@ -30,7 +30,9 @@ $_PAM_HANDLERS = array();
* failure, return false or throw an exception. Returning nothing indicates that
* the handler wants to be skipped.
*
- * @param string $handler The handler function in the format
+ * Note, $handler must be string callback (not an array/Closure).
+ *
+ * @param string $handler Callable global handler function in the format ()
* pam_handler($credentials = NULL);
* @param string $importance The importance - "sufficient" (default) or "required"
* @param string $policy The policy type, default is "user"
@@ -45,7 +47,8 @@ function register_pam_handler($handler, $importance = "sufficient", $policy = "u
$_PAM_HANDLERS[$policy] = array();
}
- if (is_callable($handler)) {
+ // @todo remove requirement that $handle be a global function
+ if (is_string($handler) && is_callable($handler, true)) {
$_PAM_HANDLERS[$policy][$handler] = new stdClass;
$_PAM_HANDLERS[$policy][$handler]->handler = $handler;