Functions


Functions Summary
int

cot_add_user(array ruser, string email, string name, string password, string maingrp, float sendemail)

Adds new user

string

cot_build_groupsms(int userid, bool edit, int maingrp)

Builds list of user's groups, editable or not

string

cot_build_usertext(string text)

Renders user signature text

string

cot_selectbox_gender(string check, string name)

Generates gender dropdown

array

cot_user_data(int uid, bool cacheitem)

Fetches user entry from DB

Function Detail

modules\users\inc\users.functions.php at line 35

cot_add_user

public int cot_add_user(array ruser, string email, string name, string password, string maingrp, float sendemail)
Adds new user
Parameters:
ruser - User data array
email - Email address
name - User name; defaults to $email if omitted
password - Password; randomly generated if omitted
maingrp - Custom main grp
sendemail - Send email if need activation
Returns:
New user ID or false
Global:
CotDB $db

modules\users\inc\users.functions.php at line 138

cot_build_groupsms

public string cot_build_groupsms(int userid, bool edit, int maingrp)
Builds list of user's groups, editable or not
Parameters:
userid - Edited user ID
edit - Permission
maingrp - User main group
Returns:
Global:
CotDB $db

modules\users\inc\users.functions.php at line 199

cot_build_usertext

public string cot_build_usertext(string text)
Renders user signature text
Parameters:
text - Signature text
Returns:

modules\users\inc\users.functions.php at line 212

cot_selectbox_gender

public string cot_selectbox_gender(string check, string name)
Generates gender dropdown
Parameters:
check - Checked gender
name - Input name
Returns:

modules\users\inc\users.functions.php at line 232

cot_user_data

public array cot_user_data(int uid, bool cacheitem)
Fetches user entry from DB
Parameters:
uid - User ID
cacheitem - Use one time session cache
Returns: