public function checkLogin()
    {
        $this->defaultData();
        $userService = $this->getServiceLocator()->get(tao_models_classes_UserService::class);
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_BadRequest('wrong request mode');
        }

        $data = array('available' => false);
        if ($this->hasRequestParameter('login')) {
            $data['available'] = $userService->loginAvailable($this->getRequestParameter('login'));
        }

        $this->returnJson($data);
    }
public function checkLogin()
    {
        $this->defaultData();
        $userService = $this->getServiceLocator()->get(tao_models_classes_UserService::class);
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_BadRequest('wrong request mode');
        }

        $data = array('available' => false);
        if ($this->hasRequestParameter('login')) {
            $data['available'] = $userService->loginAvailable($this->getRequestParameter('login'));
        }

        $this->returnJson($data);
    }
public function checkLogin ( ) { $ this -> defaultData ( ) ; $ userService = $ this -> getServiceLocator ( ) -> get ( tao_models_classes_UserService :: class ) ; if ( ! $ this -> isXmlHttpRequest ( ) ) { throw new common_exception_BadRequest ( 'wrong request mode' ) ; } $ data = array ( 'available' => false ) ; if ( $ this -> hasRequestParameter ( 'login' ) ) { $ data [ 'available' ] = $ userService -> loginAvailable ( $ this -> getRequestParameter ( 'login' ) ) ; } $ this -> returnJson ( $ data ) ; }
action used to check if a login can be used
@return void
@throws Exception
@throws common_exception_BadRequest
action used to check if a login can be used