Skip to content

Commit

Permalink
explicitly return false; remove reliance on $_SESSION being populated…
Browse files Browse the repository at this point in the history
… (stop E_NOTICE like error thing)

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@269 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
Dave Goodwin committed Mar 2, 2012
1 parent e8f2a74 commit 37b646e
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions website_code/php/user_library.php
Expand Up @@ -267,7 +267,6 @@ function get_user_root_folder(){


/**
*
* Function is user admin
* Is this user set as an administrator
* @author Patrick Lockley
Expand All @@ -276,17 +275,9 @@ function get_user_root_folder(){
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/

function is_user_admin(){

global $xerte_toolkits_site;

if($_SESSION['toolkits_logon_id']=="site_administrator"){

if(isset($_SESSION['toolkits_logon_id']) && $_SESSION['toolkits_logon_id']=="site_administrator"){
return true;

}

return false;
}

?>

0 comments on commit 37b646e

Please sign in to comment.