Passed
Push — development ( 93c11c...9c6b11 )
by Nils
04:27
created
sources/admin.queries.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2067,16 +2067,16 @@
 block discarded – undo
2067 2067
                         );
2068 2068
 
2069 2069
                         $debug_ldap .= 'Search filter (group): '.$filter_group."<br/>".
2070
-                            'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2070
+                            'Results : '.str_replace("\n", "<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2071 2071
 
2072 2072
                         if ($result_group) {
2073 2073
                             $entries = ldap_get_entries($ldapconn, $result_group);
2074 2074
 
2075 2075
                             if ($entries['count'] > 0) {
2076 2076
                                 // Now check if group fits
2077
-                                for ($i=0; $i<$entries['count']; $i++) {
2078
-                                    $parsr=ldap_explode_dn($entries[$i]['dn'], 0);
2079
-                                    if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2077
+                                for ($i = 0; $i < $entries['count']; $i++) {
2078
+                                    $parsr = ldap_explode_dn($entries[$i]['dn'], 0);
2079
+                                    if (str_replace(array('CN=', 'cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2080 2080
                                     $GroupRestrictionEnabled = true;
2081 2081
                                     break;
2082 2082
                                     }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
     // AGSES
773 773
     if (isset($SETTINGS['agses_authentication_enabled']) === true && $SETTINGS['agses_authentication_enabled'] === '1') {
774 774
         echo '
775
-                        <div id="div-2fa-agses" class="div-2fa-method ', isset($_SESSION['2famethod-agses']) === true && $_SESSION['2famethod-agses'] === '1' ? '':'hidden', '">
775
+                        <div id="div-2fa-agses" class="div-2fa-method ', isset($_SESSION['2famethod-agses']) === true && $_SESSION['2famethod-agses'] === '1' ? '' : 'hidden', '">
776 776
                         <div id="agses_cardid_div" style="text-align:center; padding:5px; width:454px; margin:5px 0 5px;" class="ui-state-active ui-corner-all">
777 777
                             ' . $LANG['user_profile_agses_card_id'].': &nbsp;
778 778
                             <input type="text" size="12" id="agses_cardid">
@@ -780,21 +780,21 @@  discard block
 block discarded – undo
780 780
                         <div id="agses_flickercode_div" style="text-align:center; display:none;">
781 781
                             <canvas id="axs_canvas"></canvas>
782 782
                         </div>
783
-                        <input type="text" id="agses_code" name="agses_code" style="margin-top:15px;" class="input_text text ui-widget-content ui-corner-all hidden" onkeypress="if (event.keyCode == 13) launchIdentify(\'\', \''.$nextUrl.'\')" placeholder="' . addslashes($LANG['index_agses_key']).'" />
783
+                        <input type="text" id="agses_code" name="agses_code" style="margin-top:15px;" class="input_text text ui-widget-content ui-corner-all hidden" onkeypress="if (event.keyCode == 13) launchIdentify(\'\', \''.$nextUrl.'\')" placeholder="'.addslashes($LANG['index_agses_key']).'" />
784 784
                         </div>';
785 785
     }
786 786
 
787 787
     // Google Authenticator code
788 788
     if (isset($SETTINGS['google_authentication']) === true && $SETTINGS['google_authentication'] === "1") {
789 789
         echo '
790
-                        <div id="div-2fa-google" class="div-2fa-method ', isset($_SESSION['2famethod-google']) === true && $_SESSION['2famethod-google'] === '1' ? '':'hidden', '">
790
+                        <div id="div-2fa-google" class="div-2fa-method ', isset($_SESSION['2famethod-google']) === true && $_SESSION['2famethod-google'] === '1' ? '' : 'hidden', '">
791 791
                         <div id="ga_code_div" style="margin-top:5px; padding:5px; overflow: auto; width:95%;" class="ui-state-default ui-corner-all">
792 792
                             <div style="width: 18%; float:left; display:block;">
793 793
                                 <img src="includes/images/2fa_google_auth.png">
794 794
                             </div>
795 795
 
796 796
                             <div style="width: 82%; float:right; display:block;">
797
-                                <input type="text" size="4" id="ga_code" name="ga_code" style="margin-top:15px;" class="input_text text ui-widget-content ui-corner-all numeric_only" onkeypress="if (event.keyCode == 13) launchIdentify(\'\', \''.$nextUrl.'\')" placeholder="' . addslashes($LANG['ga_identification_code']).'" />
797
+                                <input type="text" size="4" id="ga_code" name="ga_code" style="margin-top:15px;" class="input_text text ui-widget-content ui-corner-all numeric_only" onkeypress="if (event.keyCode == 13) launchIdentify(\'\', \''.$nextUrl.'\')" placeholder="'.addslashes($LANG['ga_identification_code']).'" />
798 798
                                 <div id="2fa_new_code_div" style="text-align:center; display:none; margin-top:5px; padding:5px;" class="ui-state-default ui-corner-all"></div>
799 799
                                 <div style="margin-top:2px; font-size:10px; text-align:center; cursor:pointer;" onclick="send_user_new_temporary_ga_code()">' . $LANG['i_need_to_generate_new_ga_code'].'</div>
800 800
                             </div>
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
     // Yubico authentication
843 843
     if (isset($SETTINGS['yubico_authentication']) === true && $SETTINGS['yubico_authentication'] === "1") {
844 844
         echo '
845
-                        <div id="div-2fa-yubico" class="div-2fa-method ', isset($_SESSION['2famethod-yubico']) === true && $_SESSION['2famethod-yubico'] === '1' ? '':'hidden', '">
845
+                        <div id="div-2fa-yubico" class="div-2fa-method ', isset($_SESSION['2famethod-yubico']) === true && $_SESSION['2famethod-yubico'] === '1' ? '' : 'hidden', '">
846 846
                         <div id="yubico_div" style="margin-top:5px; padding:5px; overflow: auto; width:95%;" class="ui-state-default ui-corner-all">
847 847
                             <div style="width: 18%; float:left; display:block;">
848 848
                                 <img src="includes/images/yubico.png">
Please login to merge, or discard this patch.