Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class UserController extends BaseController
- {
- /**
- * @QueryParam(name="email", strict=true)
- *
- * @param string $email
- * @return array
- */
- public function getExistsAction($email)
- {
- return [
- 'result' => $this
- ->getUserManager()
- ->issetUserByEmail($email),
- ];
- }
- /**
- * @ParamConverter("userInput")
- *
- * @param UserInputModel $userInput
- * @return array
- */
- public function postAction(UserInputModel $userInput)
- {
- $user = $this
- ->getUserManager()
- ->create($userInput->getEmail(), $userInput->getPassword());
- return [
- 'user' => $user,
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement