contenido\classes\class.activeusers.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

Description: Display current online user

Requirements:

Author
Bilal Arsland  
Con_php_req
5.0  
Copyright
four for business AG  
License
http://www.contenido.org/license/LIZENZ.txt  
Link
http://www.4fb.de  
Link
http://www.contenido.org  
Package
Contenido Backend classes  
Since
file available since contenido release <= 4.6 {@internal created 2008-01-28 modified 2008-02-08, Timo Trautmann, table config added modified 2008-02-12, Timo Trautmann, bugfix in getWebsiteName modified 2008-02-18, Timo Trautmann, special functions for mysql replaced modified 2008-06-30, Frederic Schneider, add security fix modified 2008-09-08, Timo Trautmann, fixed string concat bug at websitenames $Id: class.activeusers.php 797 2008-09-08 11:55:33Z timo.trautmann $; }}  
Version
1.0.1  

\ActiveUsers

Package: Default

Properties

>VPropertypublic$iUserId
Details
Type
n/a
>VPropertypublic$oAuth
Details
Type
n/a
>VPropertypublic$oCfg
Details
Type
n/a
>VPropertypublic$oDb
Details
Type
n/a

Methods

methodpublicActiveUsers( $oDb,  $oCfg,  $oAuth) :

Constructor

Parameters
NameTypeDescription
$oDb
$oCfg
$oAuth
methodpublicdeleteInactiveUser() : \Returns

Delete all Contains in the table "online_user" that is older as Backend timeout(currently is $cfg["backend"]["timeout"] = 60)

Returns
TypeDescription
\Returnstrue if successful else false
methodpublicdeleteUser( $sUserId) : \Returns

Delete this user from 'online user' table

Parameters
NameTypeDescription
$sUserId
Returns
TypeDescription
\Returnstrue if successful, else false
methodpublicfindAllUser() : \Returns

Find all user_ids in the table 'online_user' for get rest information from table 'con_phplib_auth_user_md5'

Returns
TypeDescription
\Returnsarray of user-information
methodpublicfindUser( $sUserId) : \Returns

Find the this user if exists in the table "online_user"

Parameters
NameTypeDescription
$sUserId
Returns
TypeDescription
\Returnstrue if this User is found, else false
methodpublicgetNumberOfUsers() : \Returns

Get the number of users from the table "online_user"

Returns
TypeDescription
\Returnsif exists a number of users
methodpublicgetWebsiteName(integer $iIdClient) : \Returns

Get the website name from table con_clients

Parameters
NameTypeDescription
$iIdClientinteger

is the Client id

Returns
TypeDescription
\Returnsthe name if successful
Details
Modified
Timo Trautmann: Local database instance needed, because this function ist used in findAllUser(). findAllUser() already uses this connection  
methodpublicinsertOnlineUser( $sUserId) : \Returns

Insert this user in online_user table

Parameters
NameTypeDescription
$sUserId
Returns
TypeDescription
\Returnstrue if successful else false
methodpublicstartUsersTracking() :

Start the User Tracking: 1) First delete all inactive users with timelimit is off 2) If find user in the table, do update 3) Else there is no current user do insert new user

methodpublicupdateUser( $sUserId) : \Returns

This function do an update of current timestamp in "online_user"

Parameters
NameTypeDescription
$sUserId
Returns
TypeDescription
\Returnstrue if successful, else false
Documentation was generated by phpDocumentor 2.0.0a12.