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 AutoLogin

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

Handle auto login with Admidio and manage it in the database

The class search in the database table @b adm_auto_login for the session id. If there is an entry for that id then it reads the user id and set this user to the current session. Now the current session has become a valid user that is automatically login.


Class: AutoLogin
Code:

// create a valid user login for a Admidio session from auto login $autoLogin = new AutoLogin($gDb, $gSessionId); $autoLogin->setValidLogin($gCurrentSession, $_COOKIE['ADMIDIO_ID']);@endcode


Code:

// delete an auto login $autoLogin = new AutoLogin($gDb, $gSessionId); $autoLogin->delete(); @endcode


Par: Examples
Located at autologin.php

Methods summary

public
# __construct( Database & $database, string|integer $session = 0 )

Constructor that will create an object of a recordset of the table adm_auto_login. If the id is set than the specific auto login will be loaded.

Constructor that will create an object of a recordset of the table adm_auto_login. If the id is set than the specific auto login will be loaded.

Parameters

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

The recordset of the auto login with this session will be loaded. If session isn't set than an empty object of the table is created.

Overrides

TableAccess::__construct
public string
# generateAutoLoginId( integer $userId )

Creates a new unique auto login id for this user.

Creates a new unique auto login id for this user.

Parameters

$userId
The id of the current user.

Returns

string
Returns the auto login id.
public boolean
# save( boolean $updateFingerPrint = true )

Save all changed columns of the recordset in table of database. Therefore the class remembers if it's a new record or if only an update is necessary. The update statement will only update the changed columns. If the table has columns for creator or editor than these column with their timestamp will be updated. The current organization, last login and ip adress will be set per default.

Save all changed columns of the recordset in table of database. Therefore the class remembers if it's a new record or if only an update is necessary. The update statement will only update the changed columns. If the table has columns for creator or editor than these column with their timestamp will be updated. The current organization, last login and ip adress will be set per default.

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
If an update or insert into the database was done then return true, otherwise false.

Overrides

TableAccess::save
public
# tableCleanup( )

Method will clean the database table @b adm_auto_login. All login that had their last login one year ago will be deleted. All counted wrong auto login ids from this user will be reset.

Method will clean the database table @b adm_auto_login. All login that had their last login one year ago will be deleted. All counted wrong auto login ids from this user will be reset.

Methods inherited from TableAccess

__sleep(), clear(), connectAdditionalTable(), countAllRecords(), delete(), getValue(), hasColumnsValueChanged(), isNewRecord(), readData(), readDataByColumns(), readDataById(), setArray(), setDatabase(), setValue()

Properties summary

Properties inherited from TableAccess

$additionalTables, $columnPrefix, $columnsInfos, $columnsValueChanged, $db, $dbColumns, $keyColumnName, $new_record, $tableName

Admidio API API documentation generated by ApiGen