Chrisbjr\ApiGuard\Providers\Auth\Sentinel::byId PHP Method

byId() public method

Authenticate a user via the id.
public byId ( mixed $id ) : boolean
$id mixed
return boolean
    public function byId($id)
    {
        if ($user = $this->sentinel->getUserRepository()->findById($id)) {
            $this->sentinel->setUser($user);
            return true;
        }
        return false;
    }