$userId]); if(!$user){ return 0; } return $user['STAGE']; } /** * @param $userId * @param $orderType * @return integer */ public static function getOneStage($userId, $orderType) { $user = static::findOneAsArray("USER_ID = :USER_ID AND ORDER_TYPE=:ORDER_TYPE", [':USER_ID' => $userId, ':ORDER_TYPE' => $orderType]); if(!$user){ return 0; } return $user['STAGE']; } public static function getInfo($userId) { $userInfo = static::findOneAsArray("USER_ID = :USER_ID", [':USER_ID' => $userId]); if(!$userInfo){ return [ ]; } return $userInfo; } }