d156e2e7 by Chris Boden

Changed how determening if is administrator; pervious was was only for MU. refs #552

1 parent 562c32d1
......@@ -48,7 +48,7 @@ class PagePermissions {
}
// Anyone has access, God has no limitations
if ($data[self::ELE_SEL] == self::OPT_ALL || is_site_admin()) {
if ($data[self::ELE_SEL] == self::OPT_ALL || self::is_admin()) {
return true;
}
......@@ -99,6 +99,10 @@ class PagePermissions {
return $user_role;
}
public static function is_admin($user = false) {
return (self::get_user_role($user) == 'administrator' ? true : false);
}
public static function getFieldNames() {
static $fields = false;
if (false !== $fields) {
......