Elgg
Version 3.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
lib
pam.php
Go to the documentation of this file.
1
<?php
39
function
register_pam_handler
(
$handler
, $importance =
"sufficient"
, $policy =
"user"
) {
40
// setup array for this type of pam if not already set
41
if
(!isset(\
ElggPAM::$_handlers
[$policy])) {
42
\ElggPAM::$_handlers
[$policy] = [];
43
}
44
45
// @todo remove requirement that $handle be a global function
46
if
(is_string(
$handler
) && is_callable(
$handler
,
true
)) {
47
\ElggPAM::$_handlers
[$policy][
$handler
] = new \stdClass;
48
49
\ElggPAM::$_handlers
[$policy][
$handler
]->handler =
$handler
;
50
\ElggPAM::$_handlers
[$policy][
$handler
]->importance = strtolower($importance);
51
52
return
true
;
53
}
54
55
return
false
;
56
}
57
67
function
unregister_pam_handler
(
$handler
, $policy =
"user"
) {
68
unset(\
ElggPAM::$_handlers
[$policy][
$handler
]);
69
}
ElggPAM\$_handlers
static $_handlers
Definition:
ElggPAM.php:13
register_pam_handler
register_pam_handler($handler, $importance="sufficient", $policy="user")
Register a PAM handler.
Definition:
pam.php:39
unregister_pam_handler
unregister_pam_handler($handler, $policy="user")
Unregisters a PAM handler.
Definition:
pam.php:67
$handler
$handler
Definition:
add.php:7
Generated on Tue Mar 2 2021 00:00:20 for Elgg by
1.8.11