private function createUser($sendEmail = true)
	{
		$model = new RegisterForm;

		if (!empty($_POST))
		{
			$model->attributes = $_POST;

			// Save the user's information
			if ($model->save($sendEmail))
				return Users::model()->findByAttributes(array('email' => $_POST['email']))->getAPIAttributes(array('password'), array('role', 'metadata'));
			else
				return $this->returnError(400, NULL, $model->getErrors());
		}

		throw new CHttpException(400, Yii::t('Api.user', 'An unexpected error occured fulfilling your request.'));
	}
private function createUser($sendEmail = true)
	{
		$model = new RegisterForm;

		if (!empty($_POST))
		{
			$model->attributes = $_POST;

			// Save the user's information
			if ($model->save($sendEmail))
				return Users::model()->findByAttributes(array('email' => $_POST['email']))->getAPIAttributes(array('password'), array('role', 'metadata'));
			else
				return $this->returnError(400, NULL, $model->getErrors());
		}

		throw new CHttpException(400, Yii::t('Api.user', 'An unexpected error occured fulfilling your request.'));
	}
private function createUser ( $ sendEmail = true ) { $ model = new RegisterForm ; if ( ! empty ( $ _POST ) ) { $ model -> attributes = $ _POST ; // Save the user's information
 if ( $ model -> save ( $ sendEmail ) ) return Users :: model ( ) -> findByAttributes ( array ( 'email' => $ _POST [ 'email' ] ) ) -> getAPIAttributes ( array ( 'password' ) , array ( 'role' , 'metadata' ) ) ; else return $ this -> returnError ( 400 , NULL , $ model -> getErrors ( ) ) ; } throw new CHttpException ( 400 , Yii :: t ( 'Api.user' , 'An unexpected error occured fulfilling your request.' ) ) ; }
Utilizes the registration form to create a new user
@return array
Utilizes the registration form to create a new user