public function revoke($role, $userId) { if (empty($userId)) { return false; } return $this->db->createCommand()->delete($this->assignmentTable, ['user_id' => (string) $userId, 'item_name' => $role->name])->execute() > 0; }
public function revoke($role, $userId) { if ($this->cache !== null) { $this->cache->delete($this->assignmentsCachePrefix . '_' . $userId); } parent::revoke($role, $userId); }