contenido\classes\class.activeusers.php
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
Package: Default
Properties
Methods



deleteInactiveUser() : \ReturnsDelete all Contains in the table "online_user" that is older as
Backend timeout(currently is $cfg["backend"]["timeout"] = 60)
Returns| Type | Description |
|---|
| \Returns | true if successful else false |



deleteUser( $sUserId) : \ReturnsDelete this user from 'online user' table
Parameters| Name | Type | Description |
|---|
| $sUserId | | |
|---|
Returns| Type | Description |
|---|
| \Returns | true if successful, else false |



findAllUser() : \ReturnsFind all user_ids in the table 'online_user' for get rest information from
table 'con_phplib_auth_user_md5'
Returns| Type | Description |
|---|
| \Returns | array of user-information |



findUser( $sUserId) : \ReturnsFind the this user if exists in the table "online_user"
Parameters| Name | Type | Description |
|---|
| $sUserId | | |
|---|
Returns| Type | Description |
|---|
| \Returns | true if this User is found, else false |



getNumberOfUsers() : \ReturnsGet the number of users from the table "online_user"
Returns| Type | Description |
|---|
| \Returns | if exists a number of users |



getWebsiteName(integer $iIdClient) : \ReturnsGet the website name from table con_clients
Parameters| Name | Type | Description |
|---|
| $iIdClient | integer | is the Client id |
|---|
Returns| Type | Description |
|---|
| \Returns | the name if successful |
Details- Modified
- Timo Trautmann: Local database instance needed, because this function ist used in
findAllUser(). findAllUser() already uses this connection



insertOnlineUser( $sUserId) : \ReturnsInsert this user in online_user table
Parameters| Name | Type | Description |
|---|
| $sUserId | | |
|---|
Returns| Type | Description |
|---|
| \Returns | true if successful else false |



updateUser( $sUserId) : \ReturnsThis function do an update of current timestamp in "online_user"
Parameters| Name | Type | Description |
|---|
| $sUserId | | |
|---|
Returns| Type | Description |
|---|
| \Returns | true if successful, else false |