Index
User management
This module provides user management to the site, allowing:
The following keys are provided by this module:
In anonymous sections, this field is not defined (it is null).
The template to run to view the registration conditions
The default expiration for the cookie
Any value accepted by the strtotime() function is valid. The expiration is the time from the first login after which the cookie will expire. The "idle" property has higher precedence over this "expiration" value.
The idle time for the cookie or null if only "expiration" is used
Any value accepted by the strtotime() function is valid. The idle is the time from the last activity after which the cookie will expire. This means if you set "idle" the cookie will be set on every hit to posticipate the expiration.
Constructor
Initializes a TIP_User instance and performs the user authentication.
Notice in this constructor no external modules can be called, because many of them (if not all) depend on TIP_User. So the eventual errors are stored in the $_constructor_error private property and processed in the postConstructor() method.
Custom post construction method
Overrides the default post-constructor method appending the constructor error processing.
Destructor
Updates the record of the current logged-in user, if any.
Login a registered user
Performs the login option for a specific user. The row data of the user to login must be present in the '_row' internal property: if not defined, a logout action is called.
Logout the current user
Performs the logout option for the current user. The row data of the user to login must be present in the '_row' internal property.
Get a field value of the logged user
Retrieves a field value for the current logged-in user. If no user is logged or the field is not found, it returns null.
Set a field value of the logged user
Changes a field value for the current logged-in user. If no user is logged or the field is not found, it returns false.
Increment a field
Shortcut for a often used operation that increment a field value. Often used to update user statistics.
Perform an add action
Overrides the default add action, showing the conditions to accept before registering a new user and performing the autologin (if needed).
Perform a login action
Presents a login form and process the submitted fields accordling.
Perform a logout action