Class: I2CE User Form (Development)
This article describes the class I2CE_User_Form .
- Extends the class: I2CE_Form.
- Location: Part of the module UserForm in the package I2CE 4.0-dev
- Source: Defined in the file modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 33
- Author: Luke Duncan <lduncan@intrahealth.org>
- Since: v2.0.0
Object for dealing with system users. This class uses the interface to handle editing of users from within the system as well as handles role access for pages.
Form Fields
This class is a form class and provides the following form fields
username
The form field username is implemented by STRING_LINE
password
The form field password is implemented by STRING_PASS
confirm
The form field confirm is implemented by STRING_PASS
role
The form field role is implemented by MAP
generate_password
The form field generate_password is implemented by YESNO
Variables
$user
The I2CE_User which makes up this form protected I2CE_User $user
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 85
- Type: protected $user
$allowedDetails
of string the allowed details
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 91
- Type: protected array $allowedDetails
Methods
__construct()
Create a new instance of a I2CE_User_Form object. If the username isn't given then it will be determined from the session array.
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 101
- Signature: public function __construct($form,$username)
- Parameters:
__get()
Magic method to access user info
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 167
- Signature: public function __get($detail)
- Parameters:
- string $detail
- Returns: string
__set()
Magic method to set user info
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 196
- Signature: public function __set($detail,$value)
- Parameters:
- string $detail
- $value
- Returns: string
__unset()
Magic method to set user info
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 225
- Signature: public function __unset($detail)
- Parameters:
- $detail
- Returns: string
changePassword()
Change the password for this user. This will update a user's record to change the password in the database. It checks to make sure the new password matches the confirmation.
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 285
- Signature: public function changePassword($post)
- Parameters:
- array $post
- Returns: string
The message to display back to the user signifying success or failure. @global array
displayName()
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 157
- Signature: public function displayName()
- Returns: string
The first initial and last name of this user.
getRoleNameFromShortName()
Get the display name associated to a role's shortname
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 69
- Signature: static public function getRoleNameFromShortName($name)
- Parameters:
- string $name
the shortname of the role
- string $name
- Returns: string
getTrickleUpFromShortName()
Returns the role trickle up from the shortname
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 42
- Signature: static public function getTrickleUpFromShortName($name)
- Parameters:
- string $name
the role shortname
- string $name
- Returns: array
(an empty array if there is no such tag name)
populate()
Populate the member variables of this object. This will also update the user log to show the latest activity for this login. @param boolean $update_log @global array
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 254
- Signature: public function populate()
save()
Saves the user to the database. This method saves all the user data and updates the access the user has for this system. @global array
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 382
- Signature: public function save()
setFromPost()
Load the member variables from an array The array can contain the keys 'id', 'parent', 'fields'. The later of which is an array indexed by field names and which contains the values of the field
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 307
- Signature: public function setFromPost($post,$populate_on_set_id)
- Parameters:
- array $post
The post object is passed as a reference - $populate_on_set_id
- Default Value: false
- array $post
tryGeneratePassword()
Try to generate a new password and assign it to the password and confirm variables.
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 335
- Signature: public function tryGeneratePassword()
validate()
Checks to make sure all the required fields are valid. Checks to make sure the username is unique in the system and that the password matches the confirmed password. @global array
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 361
- Signature: public function validate()
Inherited Methods
__isset()
This public method is inherited from I2CE_Form->__isset()
addChildForm()
This public method is inherited from I2CE_Form->addChildForm()
addField()
This public method is inherited from I2CE_Form->addField()
cleanup()
This public method is inherited from I2CE_Form->cleanup()
clearFields()
This public method is inherited from I2CE_Form->clearFields()
current()
This public method is inherited from I2CE_Form->current()
displayField()
This public method is inherited from I2CE_Form->displayField()
form()
This public method is inherited from I2CE_Form->form()
getAllowedParentForms()
This public method is inherited from I2CE_Form->getAllowedParentForms()
getAttribute()
This public method is inherited from I2CE_Form->getAttribute()
getChildForms()
This public method is inherited from I2CE_Form->getChildForms()
getChildFormsByForm()
This public method is inherited from I2CE_Form->getChildFormsByForm()
getChildren()
This public method is inherited from I2CE_Form->getChildren()
getDisplayName()
This public method is inherited from I2CE_Form->getDisplayName()
getField()
This public method is inherited from I2CE_Form->getField()
getFieldNames()
This public method is inherited from I2CE_Form->getFieldNames()
getFormId()
This public method is inherited from I2CE_Form->getFormId()
getHTMLName()
This public method is inherited from I2CE_Form->getHTMLName()
getId()
This public method is inherited from I2CE_Form->getId()
getParent()
This public method is inherited from I2CE_Form->getParent()
getParentForm()
This public method is inherited from I2CE_Form->getParentForm()
getParentID()
This public method is inherited from I2CE_Form->getParentID()
getQueryDisplay()
This public method is inherited from I2CE_Form->getQueryDisplay()
getQueryFields()
This public method is inherited from I2CE_Form->getQueryFields()
getQueryString()
This public method is inherited from I2CE_Form->getQueryString()
hasAttribute()
This public method is inherited from I2CE_Form->hasAttribute()
hasInvalid()
This public method is inherited from I2CE_Form->hasInvalid()
key()
This public method is inherited from I2CE_Form->key()
listFields()
This public method is inherited from I2CE_Form->listFields()
load()
This public method is inherited from I2CE_Form->load()
next()
This public method is inherited from I2CE_Form->next()
processDOM()
This public method is inherited from I2CE_Form->processDOM()
removeField()
This public method is inherited from I2CE_Form->removeField()
reset()
This public method is inherited from I2CE_Form->reset()
rewind()
This public method is inherited from I2CE_Form->rewind()
search()
This public method is inherited from I2CE_Form->search()
setAttribute()
This public method is inherited from I2CE_Form->setAttribute()
setDisplayName()
This public method is inherited from I2CE_Form->setDisplayName()
setForm()
This public method is inherited from I2CE_Form->setForm()
setId()
This public method is inherited from I2CE_Form->setId()
setParent()
This public method is inherited from I2CE_Form->setParent()
valid()
This public method is inherited from I2CE_Form->valid()
addFormFields()
This protected method is inherited from I2CE_Form->addFormFields()
getFormFieldsData()
This protected method is inherited from I2CE_Form->getFormFieldsData()
lookupArray()
This protected method is inherited from I2CE_Form->lookupArray()
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Variables
$children
Theis public variable is inherited from I2CE_Form->$children
$fields
Theis protected variable is inherited from I2CE_Form->$fields
$parent
Theis protected variable is inherited from I2CE_Form->$parent
$id
Theis protected variable is inherited from I2CE_Form->$id
$attributes
Theis protected variable is inherited from I2CE_Form->$attributes
$parent_forms
Theis protected variable is inherited from I2CE_Form->$parent_forms
Inherited Fuzzy Methods
isNumeric()
This method is inherited from I2CE_Form->isNumeric()
getLimitStyles()
This method is inherited from I2CE_Form->getLimitStyles()
checkLimit()
This method is inherited from I2CE_Form->checkLimit()
checkWhereClause()
This method is inherited from I2CE_Form->checkWhereClause()
createCheckFunction()
This method is inherited from I2CE_Form->createCheckFunction()
createCheckLimitString()
This method is inherited from I2CE_Form->createCheckLimitString()
generateLimit()
This method is inherited from I2CE_Form->generateLimit()
generateWhereClause()
This method is inherited from I2CE_Form->generateWhereClause()
processLimit()
This method is inherited from I2CE_Form->processLimit()
getDisplayedExistingLimit()
This method is inherited from I2CE_Form->getDisplayedExistingLimit()
isComponentized()
This method is inherited from I2CE_Form->isComponentized()
addChild()
This method is inherited from I2CE_Form->addChild()
getChildIds()
This method is inherited from I2CE_Form->getChildIds()
getStorage()
This method is inherited from I2CE_Form->getStorage()
isWritable()
This method is inherited from I2CE_Form->isWritable()
populateChild()
This method is inherited from I2CE_Form->populateChild()
populateChildren()
This method is inherited from I2CE_Form->populateChildren()
populateFirst()
This method is inherited from I2CE_Form->populateFirst()
populateHistory()
This method is inherited from I2CE_Form->populateHistory()
populateLast()
This method is inherited from I2CE_Form->populateLast()
delete()
This method is inherited from I2CE_Form->delete()
setChangeType()
This method is inherited from I2CE_Form->setChangeType()
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()