Changeset 1559 in ExiteCMS for trunk/administration/settings_security.php
- Timestamp:
- 07/30/08 18:35:15 (4 years ago)
- File:
-
- 1 edited
-
trunk/administration/settings_security.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/settings_security.php
r1558 r1559 44 44 $auth_local = $_POST['auth_method']{1} == "+" ? "1" : "0"; 45 45 switch ($auth_method) { 46 case "0": // Local only 47 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'local' WHERE cfg_name = 'auth_type'"); 48 break; 46 49 case "1": // LDAP 47 50 if ($auth_local) { … … 60 63 case "3": // OpenID 61 64 if ($auth_local) { 62 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = ' openid,local' WHERE cfg_name = 'auth_type'");65 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'local,openid' WHERE cfg_name = 'auth_type'"); 63 66 } else { 64 67 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'openid' WHERE cfg_name = 'auth_type'"); … … 106 109 107 110 // determine the auth_method defined 108 $auth_methods = explode(",",$settings2['auth_type'].","); 109 switch($auth_methods[0]) { 110 case "ldap": 111 $auth_method = 1; 112 break; 113 case "ad": 114 $auth_method = 2; 115 break; 116 case "openid": 117 $auth_method = 3; 118 case "local": 119 break; 120 default: 121 $auth_method = 0; 111 $auth_methods = explode(",",$settings2['auth_type']); 112 $auth_method = 0; 113 $auth_local = false; 114 foreach($auth_methods as $auth_method) { 115 switch($auth_method) { 116 case "ldap": 117 $auth_method = 1; 118 break; 119 case "ad": 120 $auth_method = 2; 121 break; 122 case "openid": 123 $auth_method = 3; 124 case "local": 125 $auth_local = true; 126 break; 127 default: 128 $auth_method = 0; 129 } 122 130 } 123 $variables['auth_method'] = $auth_method;124 131 125 132 // check if a local fallback is defined 126 if ($auth_method && $auth_methods[1] == "local") { 127 $variables['auth_method'] .= "+"; 128 } 133 $variables['auth_method'] .= $auth_method . ($auth_local ? "+" : " "); 129 134 130 135 // define the admin body panel
Note: See TracChangeset
for help on using the changeset viewer.
