src/Common/ValidateAuthentication.php
public static function user(Request $request)
    {
        try {

            $data = self::token($request);
            $repository = db::em()->getRepository(cfg::USER_ENTITY);
            return $repository->find($data->data->id ?? 0);
        } catch (HeaderWithoutAuthorizationException $ex) {
            return false;
        }
    }
public static function user(Request $request)
    {
        try {

            $data = self::token($request);
            $repository = db::em()->getRepository(cfg::USER_ENTITY);
            return $repository->find($data->data->id ?? 0);
        } catch (HeaderWithoutAuthorizationException $ex) {
            return false;
        }
    }
public static function user ( Request $ request ) { try { $ data = self :: token ( $ request ) ; $ repository = db :: em ( ) -> getRepository ( cfg :: USER_ENTITY ) ; return $ repository -> find ( $ data -> data -> id ?? 0 ) ; } catch ( HeaderWithoutAuthorizationException $ ex ) { return false ; } }
Returns the data of User according Database
@author Edson B S Monteiro <bruno.monteirodg@gmail.com>
@since 1.0
@param Request $request
@return boolean|{UserEntity}
Returns the data of User according Database