removeRole() abstract public method

Remove role from user or user group.
abstract public removeRole ( mixed $contentId, mixed $roleId )
$contentId mixed
$roleId mixed
 /**
  * Remove role from user or user group.
  *
  * @param mixed $contentId
  * @param mixed $roleId
  */
 public function removeRole($contentId, $roleId)
 {
     try {
         return $this->innerGateway->removeRole($contentId, $roleId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Beispiel #2
0
 /**
  * Un-assign a role.
  *
  * @param mixed $contentId The user or user group Id to un-assign the role from.
  * @param mixed $roleId
  */
 public function unassignRole($contentId, $roleId)
 {
     $this->userGateway->removeRole($contentId, $roleId);
 }