@@ -13,7 +13,7 @@ |
||
13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | */ |
15 | 15 | global $LANG; |
16 | -$LANG = array ( |
|
16 | +$LANG = array( |
|
17 | 17 | 'report_a_bug' => 'Report a Bug', |
18 | 18 | 'user_profile_api_key' => 'Your API key', |
19 | 19 | 'settings_ldap_and_local_authentication' => 'Local and LDAP users', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | */ |
15 | 15 | global $LANG; |
16 | -$LANG = array ( |
|
16 | +$LANG = array( |
|
17 | 17 | 'report_a_bug' => 'Report a Bug', |
18 | 18 | 'user_profile_api_key' => 'Your API key', |
19 | 19 | 'settings_ldap_and_local_authentication' => 'Local and LDAP users', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | */ |
15 | 15 | global $LANG; |
16 | -$LANG = array ( |
|
16 | +$LANG = array( |
|
17 | 17 | 'report_a_bug' => 'Report a Bug', |
18 | 18 | 'user_profile_api_key' => 'Your API key', |
19 | 19 | 'settings_ldap_and_local_authentication' => 'Local and LDAP users', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | */ |
15 | 15 | global $LANG; |
16 | -$LANG = array ( |
|
16 | +$LANG = array( |
|
17 | 17 | 'report_a_bug' => 'Report a Bug', |
18 | 18 | 'user_profile_api_key' => 'Your API key', |
19 | 19 | 'settings_ldap_and_local_authentication' => 'Local and LDAP users', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | */ |
15 | 15 | global $LANG; |
16 | -$LANG = array ( |
|
16 | +$LANG = array( |
|
17 | 17 | 'report_a_bug' => 'Report a Bug', |
18 | 18 | 'user_profile_api_key' => 'Your API key', |
19 | 19 | 'settings_ldap_and_local_authentication' => 'Local and LDAP users', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | */ |
15 | 15 | global $LANG; |
16 | -$LANG = array ( |
|
16 | +$LANG = array( |
|
17 | 17 | 'report_a_bug' => 'Report a Bug', |
18 | 18 | 'user_profile_api_key' => 'Your API key', |
19 | 19 | 'settings_ldap_and_local_authentication' => 'Local and LDAP users', |
@@ -446,10 +446,10 @@ discard block |
||
446 | 446 | if (($SETTINGS['ldap_bind_dn'] === "" && $SETTINGS['ldap_bind_passwd'] === "") || $ldapbind === true) { |
447 | 447 | $filter = "(&(".$SETTINGS['ldap_user_attribute']."=".$username.")(objectClass=".$SETTINGS['ldap_object_class']."))"; |
448 | 448 | $result = ldap_search( |
449 | - $ldapconn, |
|
450 | - $SETTINGS['ldap_search_base'], |
|
451 | - $filter, |
|
452 | - array('dn', 'mail', 'givenname', 'sn') |
|
449 | + $ldapconn, |
|
450 | + $SETTINGS['ldap_search_base'], |
|
451 | + $filter, |
|
452 | + array('dn', 'mail', 'givenname', 'sn') |
|
453 | 453 | ); |
454 | 454 | if ($debugLdap == 1) { |
455 | 455 | fputs( |
@@ -496,11 +496,11 @@ discard block |
||
496 | 496 | if ($entries['count'] > 0) { |
497 | 497 | // Now check if group fits |
498 | 498 | for ($i=0; $i<$entries['count']; $i++) { |
499 | - $parsr=ldap_explode_dn($entries[$i]['dn'], 0); |
|
500 | - if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) { |
|
499 | + $parsr=ldap_explode_dn($entries[$i]['dn'], 0); |
|
500 | + if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) { |
|
501 | 501 | $GroupRestrictionEnabled = true; |
502 | 502 | break; |
503 | - } |
|
503 | + } |
|
504 | 504 | } |
505 | 505 | |
506 | 506 | } |
@@ -495,9 +495,9 @@ |
||
495 | 495 | |
496 | 496 | if ($entries['count'] > 0) { |
497 | 497 | // Now check if group fits |
498 | - for ($i=0; $i<$entries['count']; $i++) { |
|
499 | - $parsr=ldap_explode_dn($entries[$i]['dn'], 0); |
|
500 | - if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) { |
|
498 | + for ($i = 0; $i < $entries['count']; $i++) { |
|
499 | + $parsr = ldap_explode_dn($entries[$i]['dn'], 0); |
|
500 | + if (str_replace(array('CN=', 'cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) { |
|
501 | 501 | $GroupRestrictionEnabled = true; |
502 | 502 | break; |
503 | 503 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | */ |
15 | 15 | global $LANG; |
16 | -$LANG = array ( |
|
16 | +$LANG = array( |
|
17 | 17 | 'at_user_updated' => 'User #user_login# was updated', |
18 | 18 | 'report_a_bug' => 'Report a Bug', |
19 | 19 | 'user_profile_api_key' => 'Your API key', |
@@ -50,23 +50,23 @@ |
||
50 | 50 | Handle CASES |
51 | 51 | */ |
52 | 52 | switch (filter_input(INPUT_POST, 'type', FILTER_SANITIZE_STRING)) { |
53 | -case "checkSessionExists": |
|
54 | - // Case permit to check if SESSION is still valid |
|
55 | - session_start(); |
|
56 | - if (isset($_SESSION['CPM']) === true) { |
|
57 | - echo "1"; |
|
58 | - } else { |
|
59 | - // In case that no session is available |
|
60 | - // Force the page to be reloaded and attach the CSRFP info |
|
61 | - |
|
62 | - // Load CSRFP |
|
63 | - $csrfp_array = include '../includes/libraries/csrfp/libs/csrfp.config.php'; |
|
64 | - |
|
65 | - // Send back CSRFP info |
|
66 | - echo $csrfp_array['CSRFP_TOKEN'].";".filter_input(INPUT_POST, $csrfp_array['CSRFP_TOKEN'], FILTER_SANITIZE_STRING); |
|
67 | - } |
|
53 | + case "checkSessionExists": |
|
54 | + // Case permit to check if SESSION is still valid |
|
55 | + session_start(); |
|
56 | + if (isset($_SESSION['CPM']) === true) { |
|
57 | + echo "1"; |
|
58 | + } else { |
|
59 | + // In case that no session is available |
|
60 | + // Force the page to be reloaded and attach the CSRFP info |
|
61 | + |
|
62 | + // Load CSRFP |
|
63 | + $csrfp_array = include '../includes/libraries/csrfp/libs/csrfp.config.php'; |
|
64 | + |
|
65 | + // Send back CSRFP info |
|
66 | + echo $csrfp_array['CSRFP_TOKEN'].";".filter_input(INPUT_POST, $csrfp_array['CSRFP_TOKEN'], FILTER_SANITIZE_STRING); |
|
67 | + } |
|
68 | 68 | |
69 | - break; |
|
69 | + break; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |