AppserverIo\Appserver\ServletEngine\Security\SimpleGroup::removeMember PHP Метод

removeMember() публичный Метод

Removes the passed principal from the group.
public removeMember ( AppserverIo\Psr\Security\PrincipalInterface $principal ) : boolean
$principal AppserverIo\Psr\Security\PrincipalInterface The principal to remove
Результат boolean TRUE if the member was successfully removed, FALSE if the principal was not a member
    public function removeMember(PrincipalInterface $principal)
    {
        // query whether or not the passed principal is a member of this group
        if ($this->members->exists($principal->getName())) {
            // remove the princial and return TRUE
            $this->members->remove($principal->getName());
            return true;
        }
        // return FALSE, if not
        return false;
    }