/** * Save changes made to an existing user's permissions * */ public function SaveChanges() { global $langmessage, $gpAdmin; $username =& $_REQUEST['username']; if (!isset($this->users[$username])) { message($langmessage['OOPS']); return false; } if (!empty($_POST['email'])) { $this->users[$username]['email'] = $_POST['email']; } $this->users[$username]['granted'] = $this->GetPostedPermissions($username); $this->users[$username]['editing'] = $this->GetEditingPermissions(); //this needs to happen before SaveUserFile(); //update the /_session file $userinfo =& $this->users[$username]; $userinfo = \gp\tool\Session::SetSessionFileName($userinfo, $username); //make sure $userinfo['file_name'] is set if (!$this->SaveUserFile()) { return false; } // update the $user_file_name file $is_curr_user = $gpAdmin['username'] == $username; $this->UserFileDetails($username, $is_curr_user); return true; }