public static function extractToken($token) {
    $extract = self::$config['jwt_extract']($token);
    if (!$extract) {
      return false;
    }
    $guid = $extract['guid'];

    $user = Nymph::getEntity(
        ['class' => '\Tilmeld\Entities\User'],
        ['&',
          'guid' => $guid
        ]
    );
    if (!$user || !$user->guid || !$user->enabled) {
      return false;
    }

    return $user;
  }
public static function extractToken($token) {
    $extract = self::$config['jwt_extract']($token);
    if (!$extract) {
      return false;
    }
    $guid = $extract['guid'];

    $user = Nymph::getEntity(
        ['class' => '\Tilmeld\Entities\User'],
        ['&',
          'guid' => $guid
        ]
    );
    if (!$user || !$user->guid || !$user->enabled) {
      return false;
    }

    return $user;
  }
public static function extractToken ( $ token ) { $ extract = self :: $ config [ 'jwt_extract' ] ( $ token ) ; if ( ! $ extract ) { return false ; } $ guid = $ extract [ 'guid' ] ; $ user = Nymph :: getEntity ( [ 'class' => '\Tilmeld\Entities\User' ] , [ '&' , 'guid' => $ guid ] ) ; if ( ! $ user || ! $ user -> guid || ! $ user -> enabled ) { return false ; } return $ user ; }
Validate and extract the user from a token.

@param string $token The authentication token.
@return \Tilmeld\Entities\User|bool The user on success, false on failure.
Validate and extract the user from a token .