public function isUserInRoleByName(string $userName): bool
    {
        if (\in_array($userName, \array_column($this->users, 'name'), true)) {
            return true;
        }

        return false;
    }
public function isUserInRoleByName(string $userName): bool
    {
        if (\in_array($userName, \array_column($this->users, 'name'), true)) {
            return true;
        }

        return false;
    }
public function isUserInRoleByName ( string $ userName ) : bool { if ( \ in_array ( $ userName , \ array_column ( $ this -> users , 'name' ) , true ) ) { return true ; } return false ; }
Check if an user is in role, use the user name.

@param string $userName

@return bool
Check if an user is in role use the user name .