Admidio API
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Packages

  • com
    • tecnick
      • tcpdf
  • None
  • PHPMailer
    • easypeasyics
  • PHPWavUtils
  • Securimage
    • classes

Classes

  • AutoLogin
  • Component
  • ComponentUpdate
  • ConditionParser
  • Database
  • DateTimeExtended
  • Email
  • Folder
  • FormValidation
  • FunctionClass
  • Htaccess
  • HtmlDiv
  • HtmlElement
  • HtmlForm
  • HtmlFormBasic
  • HtmlFormInstallation
  • HtmlList
  • HtmlNavbar
  • HtmlPage
  • HtmlTable
  • HtmlTableBasic
  • Image
  • Inventory
  • InventoryFields
  • Language
  • LanguageData
  • ListConfiguration
  • Menu
  • Message
  • ModuleAnnouncements
  • ModuleDates
  • ModuleLists
  • ModuleMenu
  • ModuleMessages
  • Modules
  • ModuleWeblinks
  • MyFiles
  • Navigation
  • ntlm_sasl_client_class
  • Organization
  • Participants
  • PasswordHash
  • PasswordHashing
  • ProfileFields
  • RoleDependency
  • RolesRights
  • RSSfeed
  • Session
  • SystemMail
  • TableAccess
  • TableAnnouncement
  • TableCategory
  • TableDate
  • TableFile
  • TableFolder
  • TableGuestbook
  • TableGuestbookComment
  • TableInventory
  • TableInventoryField
  • TableLists
  • TableMembers
  • TableMessage
  • TablePhotos
  • TableRoles
  • TableRooms
  • TableText
  • TableUserField
  • TableUsers
  • TableWeblink
  • UploadHandlerDownload
  • UploadHandlerPhoto
  • User
  • UserRegistration

Exceptions

  • AdmException
  • WavFileException
  • WavFormatException

Functions

  • admFuncAutoload
  • admFuncGeneratePagination
  • admFuncGetBytesFromSize
  • admFuncGetDirectoryEntries
  • admFuncMaxUploadSize
  • admFuncProcessableImageSize
  • admFuncShowCreateChangeInfoById
  • admFuncShowCreateChangeInfoByName
  • admFuncVariableIsValid
  • admReadTemplateFile
  • admStrIsValidFileName
  • admStrStripTagsSpecial
  • admStrToLower
  • admStrToUpper
  • bzip2Version
  • checkDatabaseVersion
  • checkPhpVersion
  • EmailAttachment
  • FileSizeNiceDisplay
  • FormattedTimeRemaining
  • FunctionIsDisabled
  • getFormerRolesFromDatabase
  • getFutureRolesFromDatabase
  • getmicrotime
  • getRoleMemberships
  • getRolesFromDatabase
  • gzipVersion
  • hasRole
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • htmLawed
  • HTMLFilter
  • isGroupLeader
  • isMember
  • kses
  • kses_hook
  • MySQLdumpVersion
  • OutputInformation
  • SafeExec
  • showNotice
  • strAddSlashesDeep
  • strNextLetter
  • strStripSlashesDeep
  • strStripTags
  • strValidCharacters
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • version_compare_replacement
  • version_compare_replacement_sub

Class UserRegistration

TableAccess
Extended by User
Extended by UserRegistration
Copyright: 2004-2016 The Admidio Team
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( Database & $database, ProfileFields $userFields, integer $userId = 0, integer $organizationId = 0 )

Constructor that will create an object of a recordset of the users table. If the id is set than this recordset will be loaded.

Constructor that will create an object of a recordset of the users table. If the id is set than this recordset will be loaded.

Parameters

$database
Object of the class Database. This should be the default global object @b $gDb.
$userFields

An object of the ProfileFields class with the profile field structure of the current organization. This could be the default object @b $gProfileFields.

$userId

The id of the user who should be loaded. If id isn't set than an empty object with no specific user is created.

$organizationId

The id of the organization for which the user should be registered. If no id is set than the user will be registered for the current organization.

Overrides

User::__construct
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.

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.

Returns

true
Returns @b true if the registration was successful
public boolean
# delete( )

Deletes the selected user registration. If user is not valid and has no other registrations than delete user because he has no use for the system. After that a notification email is send to the user. If the user is valid than only the registration will be deleted!

Deletes the selected user registration. If user is not valid and has no other registrations than delete user because he has no use for the system. After that a notification email is send to the user. If the user is valid than only the registration will be deleted!

Returns

boolean
@b true if no error occurred

Overrides

User::delete
public
# notSendEmail( )

If called than the object will not send a SystemMail when registration was accepted or deleted.

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

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

Parameters

$updateFingerPrint

Default @b true. Will update the creator or editor of the recordset if table has columns like @b usr_id_create or @b usr_id_changed

Returns

boolean

Throws

AdmException

Overrides

User::save

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

Admidio API API documentation generated by ApiGen