public function emailExistsAction()
    {
        $email = $this->getEvent()->getRouteMatch()->getParam('email');
        $request = $this->getRequest();
        $response = $this->getResponse();

        $user = $this->getUserService()->getUserMapper()->findByEmail($email);
        if (empty($user)) {
            $result = ['result' => false];
        } else {
            $result = ['result' => true];
        }
        $response->setContent(\Zend\Json\Json::encode($result));

        return $response;
    }
public function emailExistsAction()
    {
        $email = $this->getEvent()->getRouteMatch()->getParam('email');
        $request = $this->getRequest();
        $response = $this->getResponse();

        $user = $this->getUserService()->getUserMapper()->findByEmail($email);
        if (empty($user)) {
            $result = ['result' => false];
        } else {
            $result = ['result' => true];
        }
        $response->setContent(\Zend\Json\Json::encode($result));

        return $response;
    }
public function emailExistsAction ( ) { $ email = $ this -> getEvent ( ) -> getRouteMatch ( ) -> getParam ( 'email' ) ; $ request = $ this -> getRequest ( ) ; $ response = $ this -> getResponse ( ) ; $ user = $ this -> getUserService ( ) -> getUserMapper ( ) -> findByEmail ( $ email ) ; if ( empty ( $ user ) ) { $ result = [ 'result' => false ] ; } else { $ result = [ 'result' => true ] ; } $ response -> setContent ( \ Zend \ Json \ Json :: encode ( $ result ) ) ; return $ response ; }
You can search for a user based on the email
You can search for a user based on the email