Skip to content

Controller Register

Jeff Johns edited this page Feb 4, 2014 · 3 revisions
Controller Extends Path
Register Plain_Controller /application/controllers/register.php

Request Types

Type Accessible
XMLHttpRequest Internal Only
API No
Web View Yes

This controller handles the registration requests.

Methods

__construct - Public

Called automatically which in turn calls the parent constructor. It also does the following:

  • Redirects you away from this route if the request is not internal.
  • Redirects you away if you are logged in

index - Public

Renders the main registration view.


user - Public

Processes the user registration.

Query Parameters

Variable Type Default Required Options Description
email String N/A Yes N/A The email address of the user.
password String N/A Yes N/A The password for the user.

Example Request

URL: /register/user
Query Parameters: email={EMAIL}&password={PASSWORD}

All parameters should ALWAYS be urlencoded. If this request is an XMLHttpRequest call it will return either the user key with the user information or an errors key with the error(s). If a web view it will set flash messages accordingly and redirect to where it needs to go.