diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-13 22:59:43 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-13 22:59:43 +0000 |
commit | bda4f8190d4add0a2e2cfcdf3e842b26665f4117 (patch) | |
tree | b1b4bdee5f8ca3bdc7fa1657b894cc694fd61367 /engine/lib/admin.php | |
parent | 0ee6d7c936b930d846919e72c70f21c7f0e1d9ac (diff) | |
download | elgg-bda4f8190d4add0a2e2cfcdf3e842b26665f4117.tar.gz elgg-bda4f8190d4add0a2e2cfcdf3e842b26665f4117.tar.bz2 |
Standardized users and entities.
Fleshed out elgg_set_ignore_access() and elgg_get_ignore_access()
git-svn-id: http://code.elgg.org/elgg/trunk@3533 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/admin.php')
-rw-r--r-- | engine/lib/admin.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php index c598295be..1ba971347 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -111,13 +111,12 @@ function admin_settings_page_handler($page) { * @return true|null True if the current user is an admin. */ function admin_permissions($hook, $type, $returnval, $params) { - if (is_array($params) && !empty($params['user']) && $params['user'] instanceof ElggUser) { - - $admin = $params['user']->admin; - if ($admin) { - return true; - } + if (elgg_check_access_overrides()) { + return true; } + + // consult other hooks + return NULL; } /** @@ -164,9 +163,9 @@ function clear_admin_message($guid) { } /// Register init functions -register_elgg_event_handler('init','system','admin_init'); -register_elgg_event_handler('pagesetup','system','admin_pagesetup'); +register_elgg_event_handler('init', 'system', 'admin_init'); +register_elgg_event_handler('pagesetup', 'system', 'admin_pagesetup'); // Register a plugin hook for permissions -register_plugin_hook('permissions_check','all','admin_permissions'); -register_plugin_hook('container_permissions_check','all','admin_permissions');
\ No newline at end of file +register_plugin_hook('permissions_check', 'all', 'admin_permissions'); +register_plugin_hook('container_permissions_check', 'all', 'admin_permissions');
\ No newline at end of file |