public function hasRole(Role $role)
    {
        $this->initializeRoles();
        return array_key_exists($role->getIdentifier(), $this->roles);
    }
public function hasRole(Role $role)
    {
        $this->initializeRoles();
        return array_key_exists($role->getIdentifier(), $this->roles);
    }
public function hasRole ( Role $ role ) { $ this -> initializeRoles ( ) ; return array_key_exists ( $ role -> getIdentifier ( ) , $ this -> roles ) ; }
Return if the account has a certain role

@param Role $role
@return boolean
@api
Return if the account has a certain role