public static function getUser($query = array()) { $userModel = new userModel(self::$doctrineService); $userInfo = $userModel->findOneBy($query); if ($userInfo) { return $userInfo; } return new User(); }
public static function checkUserExist($userName) { $doctrineService = self::$servicelocator->get('doctrine'); $userModel = new userModel($doctrineService); $user = $userModel->findOneBy(array('userName' => $userName)); if ($user) { return true; } return false; }