User management for the world wide web

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

GenieGate_Controller_User Class Reference

Controller for the User application. More...

Inheritance diagram for GenieGate_Controller_User:

Inheritance graph
[legend]
Collaboration diagram for GenieGate_Controller_User:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GenieGate_Controller_User (&$conf)
 Constructor.

 addListener (&$listener)
 addListener is needed to add the listeners to the other modules.

 getUrl ($id)
 Looks in the conf (in [Url] section) for a specific URL, if found returns it.

 getMailView ($to, $id)
 Creates an unstance of View_Mail using the configured view directory.

 getRedirectView ($location)
 Get a redirected view.

 do_show_signup_form ()
 Show the default signup form.

 do_show_password_change ()
 Show the screen for changing user password.

 do_change_password ()
 Change the users password.

 do_show_remind_form ()
 Shows the form for confirmation code reminder.

 do_resend_confirm ()
 Resends their confirmation code and password information.

 do_process_signup ()
 Process the signup form.

 do_confirm_account ()
 Confirms the user account.

 do_show_forgot_password ()
 Show form that asks for user UID,EMAIL and sends password.

 do_send_password ()
 Sends the user their password after they've typed in their email address or user ID.

 do_show_properties ()
 Generic, show all the users properties.

 do_main_page ()
 Show the main page for the user.

 do_logout ()
 Log out.

 do_login ()
 Login, specify LOCATION to determine where to go after a login.

 do_update_settings ()
 Update the user settings, groups and public properties.

 addPlugins ()
 Add all the plugins.

 getView ($view_id, $params=FALSE)
 Get a view object.

 run ($method=FALSE)
 Run the controller.

 finish ()
 Finish the application, call this after the display() routine.

 fireDispatchStart ($trigger, $method)
 Fire off the dispatchStart() trigger.

 fireDispatchEnd ($method, &$view)
 Fire off the dispatchEnd() method.


Public Attributes

 $APP_NAME = "User"
 Application name.

 $DISPATCH
 Dispatch table, you need to assign the KEY => method_calls to this so it knows what to run.

 $CFG
 Configuration associative array.

 $DBH
 MySQL resource link.

 $API_VERSION = "1.0"
 API_VERSION - The Version number for Plugins to use.


Detailed Description

Controller for the User application.

There are 2 ways of running the controller, they are

1.) Provide the form variables that trigger the methods. (Default) 2.) use the $method parameter with the run method. Example: $uc->run("do_show_signup_form");

Definition at line 24 of file User.php.


Constructor & Destructor Documentation

GenieGate_Controller_User &$  conf  ) 
 

Constructor.

Takes configuration as pr. the ini file.

Parameters:
$conf - associative array of config values.

Definition at line 53 of file User.php.

References GenieGate_Controller::addPlugins().


Member Function Documentation

addListener &$  listener  ) 
 

addListener is needed to add the listeners to the other modules.

Reimplemented from GenieGate_Controller.

Definition at line 70 of file User.php.

addPlugins  )  [inherited]
 

Add all the plugins.

(provided here for subclasses to use)

Subclasses should call this after they've initialized themselves for any plugins to use.

Definition at line 81 of file Controller.php.

Referenced by GenieGate_Controller_Admin::GenieGate_Controller_Admin(), and GenieGate_Controller_User().

do_confirm_account  ) 
 

Confirms the user account.

Uses form parameter C - Confirmation code, U - User ID. (parameter names abbreviated to make URL's more sane)

Definition at line 272 of file User.php.

References GenieGate_Controller::getView().

do_login  ) 
 

Login, specify LOCATION to determine where to go after a login.

Definition at line 375 of file User.php.

References do_main_page(), and getRedirectView().

do_logout  ) 
 

Log out.

Specify LOCATION to determine where to go after the logout screen.

Definition at line 365 of file User.php.

References getRedirectView(), and GenieGate_Controller::getView().

do_main_page  ) 
 

Show the main page for the user.

This should be a menu for changing their settings, and logout. (Most people will probably want to provide their own page)

Definition at line 349 of file User.php.

References GenieGate_Controller::getView().

Referenced by do_login().

do_process_signup  ) 
 

Process the signup form.

Takes the form variables USERID, NAME, EMAIL, PASSWORD, PASSWORDC, LOCATION and sets up a preliminary account, emails the user with a message showing them how to enable their account.

Definition at line 218 of file User.php.

References getMailView(), getRedirectView(), getUrl(), and GenieGate_Controller::getView().

do_resend_confirm  ) 
 

Resends their confirmation code and password information.

Definition at line 174 of file User.php.

References getMailView(), getRedirectView(), getUrl(), and GenieGate_Controller::getView().

do_send_password  ) 
 

Sends the user their password after they've typed in their email address or user ID.

(or both)

Definition at line 301 of file User.php.

References getMailView(), and GenieGate_Controller::getView().

do_show_remind_form  ) 
 

Shows the form for confirmation code reminder.

Definition at line 167 of file User.php.

References GenieGate_Controller::getView().

do_show_signup_form  ) 
 

Show the default signup form.

The retured view is "user-signup".

Definition at line 114 of file User.php.

References GenieGate_Controller::getView().

do_update_settings  ) 
 

Update the user settings, groups and public properties.

This updates the users settings, properties or groups.

The form variables:

  • LOCATION - URL to redrirect to after updating settings. (Optional)
  • PROP:propertyId - Property to modify.
  • GROUPS[] - List of group ID's to make the user a member of.
  • HAVE_GROUPS - Set to 1 to save/remove groups ID's.

The variable HAVE_GROUPS must be set to allow the saving of group ID's, (otherwise it would remove all the groups when no groups were selected)

The LOCATION parameter can be used to redirect the user to a given page after their settings are modified.

The PROP:propertyID variables are used to set various properties. This allows setting user preferences and the like.

Definition at line 406 of file User.php.

References getRedirectView(), and GenieGate_Controller::getView().

finish  )  [inherited]
 

Finish the application, call this after the display() routine.

Definition at line 154 of file Controller.php.

fireDispatchEnd method,
&$  view
[inherited]
 

Fire off the dispatchEnd() method.

Parameters:
$method - the method that was just run.
$view - the view that is about to be displayed.

Definition at line 175 of file Controller.php.

Referenced by GenieGate_Controller::run().

fireDispatchStart trigger,
method
[inherited]
 

Fire off the dispatchStart() trigger.

Parameters:
$trigger - Form variable that invoked the method.
$method - The method to be run.

Definition at line 164 of file Controller.php.

Referenced by GenieGate_Controller::run().

getMailView to,
id
 

Creates an unstance of View_Mail using the configured view directory.

Parameters:
$to - Who to send it to.
$id - The view ID, (as in getView())
Returns:
a View object that supports param() and display()

Definition at line 97 of file User.php.

Referenced by do_process_signup(), do_resend_confirm(), and do_send_password().

getUrl id  ) 
 

Looks in the conf (in [Url] section) for a specific URL, if found returns it.

Otherwise returns a url formed from the ID and the directory of this file. (We need this for confirmation Url's)

Definition at line 82 of file User.php.

Referenced by do_process_signup(), and do_resend_confirm().

getView view_id,
params = FALSE
[inherited]
 

Get a view object.

The configuration [Views][$APP_NAME] is used to figure out what directory to look in.

Parameters:
$view_id - The View ID to use.
$params - parameter(s) to use.
Returns:
A View object for displaying result.

Definition at line 112 of file Controller.php.

Referenced by GenieGate_Controller_Admin::do_alter_property(), do_change_password(), do_confirm_account(), GenieGate_Controller_Admin::do_create_group(), GenieGate_Controller_Admin::do_create_user(), GenieGate_Controller_Admin::do_delete_group(), GenieGate_Controller_Admin::do_delete_user(), GenieGate_Controller_Admin::do_export_main(), GenieGate_Controller_Admin::do_expunge(), GenieGate_Controller_Admin::do_general_search(), do_logout(), GenieGate_Controller_Admin::do_logout(), GenieGate_Controller_Admin::do_lookup_uid(), GenieGate_Controller_Admin::do_main(), do_main_page(), do_process_signup(), GenieGate_Controller_Admin::do_property_main(), do_resend_confirm(), do_send_password(), GenieGate_Controller_Admin::do_show_create_screen(), GenieGate_Controller_Admin::do_show_edit_prop(), do_show_forgot_password(), GenieGate_Controller_Admin::do_show_group(), do_show_password_change(), do_show_properties(), do_show_remind_form(), do_show_signup_form(), GenieGate_Controller_Admin::do_update_group(), do_update_settings(), GenieGate_Controller_Admin::do_update_user(), GenieGate_Controller_Admin::do_user_main(), and GenieGate_Controller_Admin::do_user_search().

run method = FALSE  )  [inherited]
 

Run the controller.

It does this by looping through the keys in the request looking for DISPATCH keys.

Parameters:
$method - OPTIONAL, used to force a given method.
Returns:
A View object for displaying the results, or FALSE if there were no methods found.

Reimplemented in GenieGate_Controller_Admin.

Definition at line 131 of file Controller.php.

References GenieGate_Controller::fireDispatchEnd(), and GenieGate_Controller::fireDispatchStart().


Member Data Documentation

$API_VERSION = "1.0" [inherited]
 

API_VERSION - The Version number for Plugins to use.

(optional, recommend inheriting from GenieGate_Api_Plugin)

Definition at line 41 of file Controller.php.


The documentation for this class was generated from the following file:
DoxyGen Documentation generated by DoxyGen