Beispiel #1
0
 public static function getUser($query = array())
 {
     $userModel = new userModel(self::$doctrineService);
     $userInfo = $userModel->findOneBy($query);
     if ($userInfo) {
         return $userInfo;
     }
     return new User();
 }
Beispiel #2
0
 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;
 }