/** * Remove rights from user * * @param int $uid * @param array $rights */ public function removeUserRights($rights, $uid = NULL) { $uid or $uid = $this->user->id; !is_array($rights) && ($rights = (array) $rights); $access = $this->getUserRights($uid) or $access = new Core_ArrayObject(); foreach ($rights as $right) { if (!$access->offsetExists($right)) { $access->offsetUnset($right); } } $this->system_cache->write('access/users/' . $uid, $access); }