Commit 50d5af7b authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove my stupid global USERs in global scope

parent 13319e6a
......@@ -29,7 +29,6 @@ define('INSTITUTIONALADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require('institution.php');
global $USER, $SESSION;
$id = param_integer('id');
$institution = new Institution(param_alpha('institution'));
......
......@@ -27,8 +27,6 @@
define('INTERNAL', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
global $USER;
if (param_integer('restore', 0)) {
$id = $USER->restore_identity();
redirect(get_config('wwwroot') . 'admin/users/edit.php?id=' . $id);
......
......@@ -37,7 +37,6 @@ $id = param_integer('id');
$user = new User;
$user->find_by_id($id);
global $USER;
if (!$USER->is_admin_for_user($user)) {
redirect(get_config('wwwroot').'user/view.php?id='.$id);
}
......
......@@ -34,7 +34,6 @@ define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'adminusers');
require_once('pieforms/pieform.php');
global $USER;
define('MENUITEM', ($USER->get('admin') ? 'configusers' : 'manageinstitutions') . '/institutionadmins');
$smarty = smarty();
......
......@@ -31,7 +31,6 @@ define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'institutions');
require_once('pieforms/pieform.php');
global $USER;
define('MENUITEM', ($USER->get('admin') ? 'configusers' : 'manageinstitutions') . '/institutions');
$smarty = smarty();
......
......@@ -34,7 +34,6 @@ define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'staffusers');
require_once('pieforms/pieform.php');
global $USER;
define('MENUITEM', ($USER->get('admin') ? 'configusers' : 'manageinstitutions') . '/institutionstaff');
$smarty = smarty();
......
......@@ -36,7 +36,6 @@ define('SECTION_PAGE', 'institutionusers');
define('MENUITEM', 'configusers/institutionusers');
require_once('pieforms/pieform.php');
require_once('institution.php');
global $USER;
$institutionelement = get_institution_selector(false);
$institution = param_alphanum('institution', false);
......
......@@ -32,7 +32,6 @@ define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'notifications');
require_once('pieforms/pieform.php');
global $USER;
define('MENUITEM', ($USER->get('admin') ? 'configusers' : 'manageinstitutions') . '/adminnotifications');
$sql = '
......
......@@ -68,8 +68,6 @@ $ALLOWEDKEYS = array(
'authinstance'
);
global $USER;
if ($USER->get('admin')) {
$authinstances = auth_get_auth_instances();
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment