Skip to content
Jeff Johns edited this page Feb 12, 2014 · 2 revisions
Controller Extends Path
User Plain_Controller /application/controllers/user.php

Request Types

Type Accessible
XMLHttpRequest Internal Only
API No
Web View No

This controller handle requests for updating user information.

Methods

__construct - Public

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

  • Redirects the user if no user id is found
  • Sets default success to false
  • Loads user model

index - Public

Returns and invalid request error. Not used.


updateEmail - Public

Updates the user's email address.

Query Parameters

Variable Type Default Required Options Description
email String N/A Yes N/A The new email address.

Example

URL: /user/update/email
Query Parameters: email=john@doe.org

updatePassword - Public

Updates the user's password.

Query Parameters

Variable Type Default Required Options Description
current_password String N/A Yes N/A The current password.
password String N/A Yes N/A The new password.

Example

URL: /user/update/password
Query Parameters: password=superSecret&current_password=notSecretEnough