Class UserRegistration
- TableAccess
-
User
-
UserRegistration
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:
Creates, assign and update user registrations in database
This class extends the User class with some special functions for new registrations. If a new user is saved than there will be an additional table entry in the registration table. This entry must be deleted if a registration is confirmed or deleted. If a registration is confirmed or deleted then a notification SystemMail will be send to the user. If email couldn't be send than an AdmException will be thrown.
Class: UserRegistration
Code:
// create a valid registration $user = new UserRegistration($gDb, $gProfileFields); $user->setValue('LAST_NAME', 'Schmidt'); $user->setValue('FIRST_NAME', 'Franka'); ... // save user data and create registration $user->save(); @endcode
Code:
// assign a registration $userId = 4711; $user = new UserRegistration($gDb, $gProfileFields, $userId); // set user to valid and send notification email $user->acceptRegistration(); @endcode
Par: Example 1
Par: Example 2
Located at userregistration.php
Methods summary
public
|
#
__construct(
Constructor that will create an object of a recordset of the users table. If the id is set than this recordset will be loaded. |
public
true
|
#
acceptRegistration( )
Deletes the registration record and set the user to valid. The user will also be assigned to all roles that have the flag @b rol_default_registration. After that a notification email is send to the user. If function returns true than the user can login for the organization of this object. |
public
boolean
|
|
public
|
#
notSendEmail( )
If called than the object will not send a SystemMail when registration was accepted or deleted. |
public
boolean
|
#
save( boolean $updateFingerPrint = true )
Save all changed columns of the recordset in table of database. If it's a new user than the registration table will also be filled with a new recordset and optional a notification mail will be send to all users of roles that have the right to confirm registrations |
Methods inherited from User
approveUsers(),
assignDefaultRoles(),
assignRoles(),
checkLogin(),
checkRolesRight(),
clear(),
columnsValueChanged(),
commentGuestbookRight(),
deleteUserFieldData(),
editAnnouncements(),
editDates(),
editDownloadRight(),
editGuestbookRight(),
editInventory(),
editPhotoRight(),
editRoleMembership(),
editUsers(),
editWeblinksRight(),
getAllMailRoles(),
getAllVisibleRoles(),
getOrganization(),
getRoleMemberships(),
getRoleMembershipsNoLeader(),
getVCard(),
getValue(),
hasRightEditProfile(),
hasRightSendMailToRole(),
hasRightViewProfile(),
hasRightViewRole(),
isAdministrator(),
isLeaderOfRole(),
isMemberOfRole(),
isWebmaster(),
manageRoles(),
noValueCheck(),
readDataById(),
renewRoleData(),
saveChangesWithoutRights(),
setOrganization(),
setPassword(),
setRoleMembership(),
setValue(),
updateLoginData()
Methods inherited from TableAccess
__sleep(),
connectAdditionalTable(),
countAllRecords(),
hasColumnsValueChanged(),
isNewRecord(),
readData(),
readDataByColumns(),
setArray(),
setDatabase()
Properties summary
private
|
$sendEmail
|
|
private
|
$tableRegistration
|
Properties inherited from User
$administrator,
$assignRoles,
$listMailRights,
$listViewRights,
$mProfileFieldsData,
$organizationId,
$rolesMembership,
$rolesMembershipLeader,
$rolesMembershipNoLeader,
$roles_rights,
$saveChangesWithoutRights,
$usersEditAllowed
Properties inherited from TableAccess
$additionalTables,
$columnPrefix,
$columnsInfos,
$columnsValueChanged,
$db,
$dbColumns,
$keyColumnName,
$new_record,
$tableName