Explorar o código

posix functions can be disabled or unavailable

tokul %!s(int64=21) %!d(string=hai) anos
pai
achega
85a08c5ef9
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      plugins/administrator/auth.php

+ 2 - 1
plugins/administrator/auth.php

@@ -36,7 +36,8 @@ function adm_check_user() {
     } else if (file_exists(SM_PATH . 'config/admins')) {
         $auths = file(SM_PATH . 'config/admins');
         $auth = in_array("$username\n", $auths);
-    } else if ($adm_id = fileowner(SM_PATH . 'config/config.php')) {
+    } else if ($adm_id = fileowner(SM_PATH . 'config/config.php') &&
+               function_exists('posix_getpwuid')) {
         $adm = posix_getpwuid( $adm_id );
         $auth = ($username == $adm['name']);
     } else {