Elgg  Version 2.3
pam.php
Go to the documentation of this file.
1 <?php
24 $_PAM_HANDLERS = array();
25 
42 function register_pam_handler($handler, $importance = "sufficient", $policy = "user") {
44 
45  // setup array for this type of pam if not already set
46  if (!isset($_PAM_HANDLERS[$policy])) {
47  $_PAM_HANDLERS[$policy] = array();
48  }
49 
50  // @todo remove requirement that $handle be a global function
51  if (is_string($handler) && is_callable($handler, true)) {
52  $_PAM_HANDLERS[$policy][$handler] = new \stdClass;
53 
54  $_PAM_HANDLERS[$policy][$handler]->handler = $handler;
55  $_PAM_HANDLERS[$policy][$handler]->importance = strtolower($importance);
56 
57  return true;
58  }
59 
60  return false;
61 }
62 
72 function unregister_pam_handler($handler, $policy = "user") {
74 
75  unset($_PAM_HANDLERS[$policy][$handler]);
76 }
global $_PAM_HANDLERS
Definition: pam.php:23
register_pam_handler($handler, $importance="sufficient", $policy="user")
Register a PAM handler.
Definition: pam.php:42
elgg global
Pointer to the global context.
Definition: elgglib.js:12
unregister_pam_handler($handler, $policy="user")
Unregisters a PAM handler.
Definition: pam.php:72
$handler
Definition: add.php:10