User management for the world wide web

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

GenieGate_Api_Plugin_Apache Class Reference

Plugin for interfacing with Apache style password database. More...

Inheritance diagram for GenieGate_Api_Plugin_Apache:

Inheritance graph
[legend]
Collaboration diagram for GenieGate_Api_Plugin_Apache:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GenieGate_Api_Plugin_Apache (&$conf)
 Constructor.

 setupUser ($ua, $fields, $conf_id)
 Set up the user account.

 userInfoChanged (&$um, $uid, &$old_values, &$new_values)
 Called whenever the users information has changed.

 userGroupsChanged (&$gm, $uid, &$oldg, &$newg)
 Listen for changes to a users group setting.

 groupNameDelete (&$gm, $gid, &$info)
 Called when a named group is removed.

 apache_replaceOrAddPw ($pf, $un, $pw)
 Replace OR add user to password file.

 removeUser ($ua, $uid, $fields)
 Removes user from password file.

 preCheck (&$ua, &$fields, &$errors)
 This is called prior to creating an account, it is called before anything is entered into the database.

 preConfirm (&$ua, &$fields, $conf_id, &$errors)
 Preconfirm user account, this is called when the user clicks on the link that was sent to them, but BEFORE the account is confirmed.

 setupUser (&$ua, &$fields, $confirm_id)
 setupUser - Sets up the user data.

 removeUser (&$ua, $uid, &$fields)
 Called during the removal of a user.

 groupNameChange (&$gm, $gid, $name, $sign_ok, $is_new)
 Called when a new group definition is created, or an existing one has been modified.

 propertyCreated (&$prop, &$section, &$property, &$description)
 Fired when a new property is being defined.

 propertyChanged (&$prop, $uid, &$section, &$property, &$old_value, &$new_value)
 fired when a property has changed.

 propertyRemoved (&$prop, $uid, $section, $property, $old_value)
 This is fired when a property is removed.

 propertyUndefine (&$prop, $section, $property)
 This is called when a property is about to be removed for all users.

 dispatchStart (&$controller, $trigger, $method)
 This is called just prior to running a dispatch method.

 dispatchEnd (&$controller, $method, &$view)
 Called after running the "model".


Detailed Description

Plugin for interfacing with Apache style password database.

This class listens for events and updates the password and group files.

It uses the configuration keys AuthGroupFile and AuthUserFile.

These entries are added using php's crypt() function, which may or may not be the same that your apache uses.

password formats are lines of user_id:password

group formats are lines of group_id: member member member

Definition at line 135 of file Apache.php.


Constructor & Destructor Documentation

GenieGate_Api_Plugin_Apache &$  conf  ) 
 

Constructor.

The section of the configuration file called [ApachePlugin] is used for this plugin.

Parameters:
$conf - The Configuration associative array.

Definition at line 147 of file Apache.php.


Member Function Documentation

apache_replaceOrAddPw pf,
un,
pw
 

Replace OR add user to password file.

This will inspect the password file for entries of the given username, replacing them with the new one if found. If not found, the user is added.

Parameters:
$pf - The password filename.
$un - The user ID.
$pw - The password.

Definition at line 223 of file Apache.php.

Referenced by setupUser(), and userInfoChanged().

dispatchEnd &$  controller,
method,
&$  view
[inherited]
 

Called after running the "model".

This is called after the dispatch method has been invoked, but before the view is shown with View::display(). $view can be assigned to.

Parameters:
$controller - The controller object.
$method - The method that ended.
$view - The view that is about to be shown.

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 176 of file Plugin.php.

dispatchStart &$  controller,
trigger,
method
[inherited]
 

This is called just prior to running a dispatch method.

$method should be perferred to using the trigger variable for indication of what is to be run. (because there may be multiple triggers pointing to the same method)

Parameters:
$controller - The Controller object.
$trigger - The form variable name, path, string that triggered this method.
$method - The method that is about to be run.

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 164 of file Plugin.php.

groupNameChange &$  gm,
gid,
name,
sign_ok,
is_new
[inherited]
 

Called when a new group definition is created, or an existing one has been modified.

Parameters:
$gm - The GroupMod object.
$gid - The group ID.
$name - The group name.
$sign_ok - Flag suggesting it's OK for a user to sign self to group.
$is_new - If this is a new group, this flag is set to TRUE, FALSE if it's an update.

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 74 of file Plugin.php.

groupNameDelete &$  gm,
gid,
&$  info
 

Called when a named group is removed.

Note:
This is called PRIOR to removal of group, (because plugins may need to query extra info)
Parameters:
$gm - GroupMod object.
$gid - Group ID that was removed.
$info - Group information that was removed.

Reimplemented from GenieGate_Api_Plugin.

Definition at line 201 of file Apache.php.

preConfirm &$  ua,
&$  fields,
conf_id,
&$  errors
[inherited]
 

Preconfirm user account, this is called when the user clicks on the link that was sent to them, but BEFORE the account is confirmed.

Parameters:
$ua - The GenieGate_UserAccount object.
$fields - The field info.
$conf_id - The confirmation ID.
$errors - The error codes.
Returns:
$errors - Array of error messages (if any)

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 41 of file Plugin.php.

propertyChanged &$  prop,
uid,
&$  section,
&$  property,
&$  old_value,
&$  new_value
[inherited]
 

fired when a property has changed.

See also:
GenieGate_Properties
Parameters:
$prop - The GenieGate_Properties object.
$uid - The user ID.
$section - The Section ID. (section key)
$property - The name of the property.
$old_value - The original value of this property. (if there was one.)
$new_value - The new value, (What this property has been changed to)

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 128 of file Plugin.php.

propertyCreated &$  prop,
&$  section,
&$  property,
&$  description
[inherited]
 

Fired when a new property is being defined.

Parameters:
$prop - The GenieGate_Properties object.
$section - The section key. (Example: genie.UserProperty)
$property - The property name. (Example: firstName)
$description - The description of this property. (Example: Persons first name)

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 114 of file Plugin.php.

propertyRemoved &$  prop,
uid,
section,
property,
old_value
[inherited]
 

This is fired when a property is removed.

(such as when a user is deleted.)

See also:
GenieGate_Properties
Parameters:
$prop - The GenieGate_Properties object.
$uid - The user ID.
$section - The section code.
$property - The property being removed.
$old_value - The original value of the property.

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 140 of file Plugin.php.

propertyUndefine &$  prop,
section,
property
[inherited]
 

This is called when a property is about to be removed for all users.

Note:
this is called prior to removing the property to give any of the callbacks an opportunity to see what the individual values were.
Parameters:
$prop - The GenieGate_Properties object.
$section - The section code.
$property - The property being removed/undefined.

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 152 of file Plugin.php.

removeUser &$  ua,
uid,
&$  fields
[inherited]
 

Called during the removal of a user.

Parameters:
$ua - The GenieGate_UserAccount object.
$uid - The user ID.
$fields - the fields data.

Reimplemented in GenieGate_Api_Plugin_ApacheDBM, and GenieGate_Api_Plugin_Logger.

Definition at line 62 of file Plugin.php.

setupUser &$  ua,
&$  fields,
confirm_id
[inherited]
 

setupUser - Sets up the user data.

This is called after a user has verified his/her email address. NOTE: this may be called several times for the same user.

Parameters:
$ua - The GenieGate_UserAccount object.
$fields - Associative array of fields for this user.
$confirm_id - Confirmation code.

Reimplemented in GenieGate_Api_Plugin_Logger.

Definition at line 53 of file Plugin.php.

setupUser ua,
fields,
conf_id
 

Set up the user account.

This will add a user to the password file. It uses the configuration variable PassFile for the file location.

Parameters:
$ua - The GenieGate_UserAccount object.
$fields - The user info.
$conf_id the confirmation code.

Definition at line 160 of file Apache.php.

References apache_replaceOrAddPw().

userGroupsChanged &$  gm,
uid,
&$  oldg,
&$  newg
 

Listen for changes to a users group setting.

This will create the groups file if it is specified in AuthGroupFile and does not exist.

Implements userGroupsChanged() in Plugin, so the arguments are the same.

Reimplemented from GenieGate_Api_Plugin.

Definition at line 183 of file Apache.php.

userInfoChanged &$  um,
uid,
&$  old_values,
&$  new_values
 

Called whenever the users information has changed.

Parameters:
$um - The GenieGate_UserAccount object.
$uid - The user ID.
$old_values - The user info before the change.
$new_values - The user new info.

Reimplemented from GenieGate_Api_Plugin.

Definition at line 168 of file Apache.php.

References apache_replaceOrAddPw().


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