Postgres::revokeRole PHP Method

revokeRole() public method

Revokes membership in a role
public revokeRole ( $role, $rolename, $admin, $type = 'RESTRICT' )
$role The name of the target role
$rolename The name of the role that will not belong to the target role
$admin (optional) Flag to revoke only the admin option
$type (optional) Type of revoke: RESTRICT | CASCADE
    function revokeRole($role, $rolename, $admin = 0, $type = 'RESTRICT')
    {
        $this->fieldClean($role);
        $this->fieldClean($rolename);
        $sql = "REVOKE ";
        if ($admin == 1) {
            $sql .= 'ADMIN OPTION FOR ';
        }
        $sql .= "\"{$role}\" FROM \"{$rolename}\" {$type}";
        return $this->execute($sql);
    }
Postgres