Overview  Package  Tree cmsdAm 0.8

cmsdAm

Class cmsdam_users

cmsdAm.cmsdam_users

class cmsdam_users

Here you can handle all cmsdAm users operations, for example creation, parameters reading, elimination, login, logout, ecc.

Useful, for example, to authenticate a user for each section access.

Class instance: $cms->users


Field Summary
public var$dbms

You should not use this variable from your section.

public var$logs

You should not use this variable from your section.

public var$debug

You should not use this variable from your section.

public var$sections

You should not use this variable from your section.

public var$ldap

You should not use this variable from your section.

public var$plugins

You should not use this variable from your section.

public str$logged_user

The name of the logged in user.

Method Summary
public arrayuser_names

This api method returns an array with ALL the cmsdAm user names.

public intuser_id

This api method returns the DB id of the user.

public struser_namebyid

This api method returns the username by its DB id (can be useful to reference other tables)

public intuser_type

This api method returns the user type by its name

public struser_email

This api method returns the user email by its name

public struser_password

This api method returns the user password by its name

public booluser_exist

This api method returns true if username exists

public booluser_add

This api method adds a new user

public struser_date

This api method returns the user date by its name

public intusers_count

This api method returns the total number of users

public booluser_check

This api method returns true if user and credentials are valid, else false

public booluser_delete

This api method delete a cmsdam user

public booluser_login

This api method can be used to login a cmsdam user

public booluser_logout

This api method can be used to logout a cmsdam user

Field Detail

dbms

public var $dbms

You should not use this variable from your section.


logs

public var $logs

You should not use this variable from your section.


debug

public var $debug

You should not use this variable from your section.


sections

public var $sections

You should not use this variable from your section.


ldap

public var $ldap

You should not use this variable from your section.


plugins

public var $plugins

You should not use this variable from your section.


logged_user

public str $logged_user

The name of the logged in user.

Method Detail

user_names()

public array user_names()

This api method returns an array with ALL the cmsdAm user names.

Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
ALL user names

user_id()

public int user_id(str username)

This api method returns the DB id of the user.

It can be used, for example, to reference other tables.

Parameters:
username - The name of the user
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
cmsdAm username DB id

user_namebyid()

public str user_namebyid(int user_id)

This api method returns the username by its DB id (can be useful to reference other tables)

Parameters:
user_id - The user DB id of the user
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
cmsdAm user name

user_type()

public int user_type(str username)

This api method returns the user type by its name

Parameters:
username - The username
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
cmsdAm user type

user_email()

public str user_email(str username)

This api method returns the user email by its name

Parameters:
username - The username
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
cmsdAm user email

user_password()

public str user_password(str username)

This api method returns the user password by its name

Parameters:
username - The username
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
cmsdAm user password

user_exist()

public bool user_exist(str username)

This api method returns true if username exists

Parameters:
username - The username
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
True or false

user_add()

public bool user_add(str username,
                     int usertype = "",
                     int useremail,
                     int userpassword,
                     int userip = "")

This api method adds a new user

Parameters:
username - The username
usertype - The user type
useremail - The user email
userpassword - The user password
userip - The user ip, auto if null
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
True on successm false false on error

user_date()

public str user_date(str username)

This api method returns the user date by its name

Parameters:
username - The username
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
The user date

users_count()

public int users_count()

This api method returns the total number of users

Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
Number of users

user_check()

public bool user_check(str username,
                       str password)

This api method returns true if user and credentials are valid, else false

Parameters:
username - The username
password - The password
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
True or false

user_delete()

public bool user_delete(str username)

This api method delete a cmsdam user

Parameters:
username - The username
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
True on success, else false

user_login()

public bool user_login(str username,
                       str password,
                       int reload = 0)

This api method can be used to login a cmsdam user

Parameters:
username - The username
password - The user password
reload - If reload is 1 the page is automatic reloaded on login
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
True on success, else false

user_logout()

public bool user_logout(int reload = 0)

This api method can be used to logout a cmsdam user

Parameters:
reload - If reload = 1 the page is automatic reloaded on logout
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
True on success, else false

Overview  Package  Tree cmsdAm 0.8