Go to the source code of this file.
◆ core_hook_sanitycheck()
core_hook_sanitycheck |
( |
& |
$hookinfo | ) |
|
Hook to do sanitycheck.
- Parameters
-
Definition at line 7 of file hook_sanitycheck.php.
References $config, $hookinfo, $i, $info, SimpleSAML\Module\callHooks(), SimpleSAML_Configuration\getInstance(), and SimpleSAML\Module\getModules().
9 assert(array_key_exists(
'errors',
$hookinfo));
10 assert(array_key_exists(
'info',
$hookinfo));
14 if(
$config->getString(
'auth.adminpassword',
'123') ===
'123') {
15 $hookinfo[
'errors'][] =
'[core] Password in config.php is not set properly';
17 $hookinfo[
'info'][] =
'[core] Password in config.php is set properly';
20 if(
$config->getString(
'technicalcontact_email',
'na@example.org') ===
'na@example.org') {
21 $hookinfo[
'errors'][] =
'[core] In config.php technicalcontact_email is not set properly';
23 $hookinfo[
'info'][] =
'[core] In config.php technicalcontact_email is set properly';
26 if (version_compare(phpversion(),
'5.4',
'>=')) {
27 $hookinfo[
'info'][] =
'[core] You are running a PHP version suitable for SimpleSAMLphp.';
29 $hookinfo[
'errors'][] =
'[core] You are running an old PHP installation. Please check the requirements for your SimpleSAMLphp version and upgrade.';
39 if (isset(
$i[
'dependencies']) && is_array(
$i[
'dependencies'])) {
40 foreach (
$i[
'dependencies'] AS $dep) {
41 if (!in_array($dep, $availmodules,
true)) {
42 $hookinfo[
'errors'][] =
'[core] Module dependency not met: ' . $mi .
' requires ' . $dep;
static getModules()
Get available modules.
static callHooks($hook, &$data=null)
Call a hook in all enabled modules.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.