Permalink
Browse files

pass username not id to isSiteAdmin

  • Loading branch information...
lornajane committed Jan 9, 2013
1 parent f05428b commit c845ca4c872952631e4e3d52615280f58b58c7d8
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/system/application/libraries/wsactions/event/Deletetrack.php
@@ -60,6 +60,9 @@ public function checkSecurity($xml)
} elseif (!$this->CI->um->isAuth()) {
$user = (string)$xml->auth->user;
}
+
+ // we need the username later, grab it
+ $username = $user;
$udata = $this->CI->um->getUserByUsername($user);
if (!empty($udata)) {
@@ -84,7 +87,7 @@ public function checkSecurity($xml)
$is_evt_admin = $this->CI->uam
->hasPerm($user, $eid, $rtype);
- $is_site_admin = $this->CI->um->isSiteAdmin($user);
+ $is_site_admin = $this->CI->um->isSiteAdmin($username);
if ($is_site_admin || $is_evt_admin) {
return true;

0 comments on commit c845ca4

Please sign in to comment.