src/Reflex/Lockdown/Lockdown.php
public function giveUserRole($user, $role)
    {
        $user   =   $this->findUserById($user);
        $role   =   $this->findRoleByKey($role);

        if ($user->is($role->key)) {
            return true;
        }
        
        return $user->join($role);
    }
public function giveUserRole($user, $role)
    {
        $user   =   $this->findUserById($user);
        $role   =   $this->findRoleByKey($role);

        if ($user->is($role->key)) {
            return true;
        }
        
        return $user->join($role);
    }
public function giveUserRole ( $ user , $ role ) { $ user = $ this -> findUserById ( $ user ) ; $ role = $ this -> findRoleByKey ( $ role ) ; if ( $ user -> is ( $ role -> key ) ) { return true ; } return $ user -> join ( $ role ) ; }
Give a user a role
@param  Reflex\Lockdown\Users\UserInterface|string $user
@param  Reflex\Lockdown\Roles\RoleInterface|string $role
@return boolean
Give a user a role