eZ\Publish\Core\Persistence\Legacy\User\Gateway\DoctrineDatabase::removeRole PHP Method

removeRole() public method

Remove role from user or user group.
public removeRole ( mixed $contentId, mixed $roleId )
$contentId mixed
$roleId mixed
    public function removeRole($contentId, $roleId)
    {
        $query = $this->handler->createDeleteQuery();
        $query->deleteFrom($this->handler->quoteTable('ezuser_role'))->where($query->expr->lAnd($query->expr->eq($this->handler->quoteColumn('contentobject_id'), $query->bindValue($contentId, null, \PDO::PARAM_INT)), $query->expr->eq($this->handler->quoteColumn('role_id'), $query->bindValue($roleId, null, \PDO::PARAM_INT))));
        $query->prepare()->execute();
    }