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 ProfileFields

Copyright: 2004-2016 The Admidio Team
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:

Reads the user fields structure out of database and give access to it

When an object is created than the actual profile fields structure will be read. In addition to this structure you can read the user values for all fields if you call @c readUserData . If you read field values than you will get the formated output. It's also possible to set user data and save this data to the database


Class: ProfileFields
Located at profilefields.php

Methods summary

public
# __construct( Database & $database, integer $organizationId )

constructor that will initialize variables and read the profile field structure

constructor that will initialize variables and read the profile field structure

Parameters

$database
Database object (should be @b $gDb)
$organizationId
The id of the organization for which the profile field structure should be read
public string[]
# __sleep( )

Called on serialization of this object. The database object could not be serialized and should be ignored.

Called on serialization of this object. The database object could not be serialized and should be ignored.

Returns

string[]
Returns all class variables that should be serialized.
public
# clearUserData( )

user data of all profile fields will be initialized the fields array will not be renewed

user data of all profile fields will be initialized the fields array will not be renewed

public mixed
# getProperty( string $fieldNameIntern, string $column, string $format = '' )

returns for a fieldname intern (usf_name_intern) the value of the column from table adm_user_fields

returns for a fieldname intern (usf_name_intern) the value of the column from table adm_user_fields

Parameters

$fieldNameIntern
Expects the @b usf_name_intern of table @b adm_user_fields
$column
The column name of @b adm_user_field for which you want the value
$format
Optional the format (is necessary for timestamps)

Returns

mixed
public string
# getPropertyById( integer $fieldId, string $column, string $format = '' )

returns for field id (usf_id) the value of the column from table adm_user_fields

returns for field id (usf_id) the value of the column from table adm_user_fields

Parameters

$fieldId
Expects the @b usf_id of table @b adm_user_fields
$column
The column name of @b adm_user_field for which you want the value
$format
Optional the format (is necessary for timestamps)

Returns

string
public string
# getHtmlValue( string $fieldNameIntern, string|integer $value, string|integer $value2 = '' )

Returns the value of the field in html format with consideration of all layout parameters

Returns the value of the field in html format with consideration of all layout parameters

Parameters

$fieldNameIntern
Internal profile field name of the field that should be html formated
$value
The value that should be formated must be commited so that layout is also possible for values that aren't stored in database
$value2
An optional parameter that is necessary for some special fields like email to commit the user id

Returns

string
Returns an html formated string that considered the profile field settings
public string|integer|boolean
# getValue( string $fieldNameIntern, string $format = '' )

Returns the user value for this column @n format = 'd.m.Y' : a date or timestamp field accepts the format of the PHP date() function @n format = 'html' : returns the value in html-format if this is necessary for that field type @n format = 'database' : returns the value that is stored in database with no format applied

Returns the user value for this column @n format = 'd.m.Y' : a date or timestamp field accepts the format of the PHP date() function @n format = 'html' : returns the value in html-format if this is necessary for that field type @n format = 'database' : returns the value that is stored in database with no format applied

Parameters

$fieldNameIntern
Expects the @b usf_name_intern of table @b adm_user_fields
$format

Returns the field value in a special format @b text, @b html, @b database or datetime (detailed description in method description)

Returns

string|integer|boolean
Returns the value for the column.
public
# noValueCheck( )

If this method is called than all further calls of method @b setValue will not check the values. The values will be stored in database without any inspections !

If this method is called than all further calls of method @b setValue will not check the values. The values will be stored in database without any inspections !

public
# readProfileFields( integer $organizationId )

Reads the profile fields structure out of database table @b adm_user_fields and adds an object for each field structure to the @b mProfileFields array.

Reads the profile fields structure out of database table @b adm_user_fields and adds an object for each field structure to the @b mProfileFields array.

Parameters

$organizationId

The id of the organization for which the profile fields structure should be read.

public
# readUserData( integer $userId, integer $organizationId )

Reads the user data of all profile fields out of database table @b adm_user_data and adds an object for each field data to the @b mUserData array. If profile fields structure wasn't read, this will be done before.

Reads the user data of all profile fields out of database table @b adm_user_data and adds an object for each field data to the @b mUserData array. If profile fields structure wasn't read, this will be done before.

Parameters

$userId
The id of the user for which the user data should be read.
$organizationId

The id of the organization for which the profile fields structure should be read if necessary.

public
# saveUserData( integer $userId )

save data of every user field

save data of every user field

Parameters

$userId
id is necessary if new user, that id was not known before
public
# setDatabase( Database & $database )

Set the database object for communication with the database of this class.

Set the database object for communication with the database of this class.

Parameters

$database
An object of the class Database. This should be the global $gDb object.
public boolean
# setValue( string $fieldNameIntern, mixed $fieldValue )

set value for column usd_value of field

set value for column usd_value of field

Parameters

$fieldNameIntern
$fieldValue

Returns

boolean

Properties summary

public array $mProfileFields
# array()
public array $mUserData
# array()
protected $mUserId
#
protected $mDb
#
protected $noValueCheck
#
public $columnsValueChanged
#
Admidio API API documentation generated by ApiGen