Public Method Details |
pxdb_user |
public void pxdb_user([ int $id ])
|
|
|
Parameter |
|
int |
$id |
= >>null<< |
|
UserID for user record. |
|
Returns |
void |
|
&singleton |
public object pxdb_user &singleton([ int $id, boolean $instantiate_new, boolean $destroy ])
|
|
Will create a new user class only if one does not already exist for current db.
|
Parameter |
|
int |
$id |
= >>null<< |
|
The UserID to instantiate. |
|
|
boolean |
$instantiate_new |
= >>true<< |
|
Whether to create a new instance if one doesn't exist (default: true) |
|
|
boolean |
$destroy |
= >>false<< |
|
Whether to destroy the current singleton. |
|
Returns |
object pxdb_user or NULL if it's being destroyed. |
|
destroy |
public void destroy()
|
|
|
Returns |
void |
Since |
0.0.4 |
|
set_username_col |
public void set_username_col(string $col)
|
|
|
Parameter |
|
string |
$col |
|
|
The column name. |
|
Returns |
void |
|
add_admin_group |
public void add_admin_group(mixed $group)
|
|
|
Parameter |
|
mixed |
$group |
|
|
name or id to add to array. |
|
Returns |
void |
|
read |
public boolean read()
|
|
Warning: documentation is missing.
|
Returns |
boolean True /false on success. |
|
sql_groups |
public string sql_groups()
|
|
This method can be overridden by child classes that wish to redefine the relationshps between users and groups -- e.g. to have all group-user relationships be defined on a per-project basis.
|
Returns |
string SQL used to fetch group ids and names for given user. |
|
get_user |
public string get_user()
|
|
|
Returns |
string Username |
|
get_uid |
public int get_uid()
|
|
|
Returns |
int id |
|
is_admin |
public boolean is_admin()
|
|
|
Returns |
boolean |
|
not_admin |
public boolean not_admin()
|
|
|
Returns |
boolean |
|
is_member |
public boolean is_member(mixed $group, [ string $behavior ])
|
|
|
Parameter |
|
mixed |
$group |
|
|
The group id (or name) OR array of these that we are checking against. |
|
|
string |
$behavior |
= >>'any'<< |
|
'any' or 'all' -- how the membership is treated -- i.e. does user have to be in any of groups specified, or all? |
|
Returns |
boolean $group Whether is in $grouparray. |
|
not_member |
public boolean not_member(string $group)
|
|
|
Parameter |
|
string |
$group |
|
|
The group name to check. |
|
Returns |
boolean $group Whether is not in $grouparray. |
|
get_groups |
public void get_groups()
|
|
|
Returns |
void |
|
build_sql |
public void build_sql()
|
|
Although you can invoke this explicitly, most of the time you are probably better off letting it be implicitly invoked from get_sql_groups() or get_sql_ugids()
|
Returns |
void |
|
get_sql_groups |
public string get_sql_groups()
|
|
|
Returns |
string List of group names. |
|
get_sql_ugids |
public string get_sql_ugids()
|
|
|
Returns |
string List of user-group IDs. |
|
set_default_ugid |
public integer set_default_ugid(int $ugid)
|
|
Set the default UserGroup ID in case you use something different than 0 as your default group ID.
|
Parameter |
|
int |
$ugid |
|
|
The default User Group ID |
|
Returns |
integer 0 if no value passed |
|
get_default_ugid |
public integer get_default_ugid()
|
|
Get the currently set default usergroup ID. See set method above.
|
Returns |
integer The ID of the current default group |
|
set_default_groupname |
public integer set_default_groupname(string $groupname)
|
|
Set the default group name to something other than 'Everybody' if your project has something different.
|
Parameter |
|
string |
$groupname |
|
|
name of the default group |
|
Returns |
integer 0 if no value passed |
|
get_default_groupname |
public string get_default_groupname()
|
|
Gets the currently set name for the default group
|
Returns |
string The current default group name |
|
get_group_array |
public array get_group_array()
|
|
Added by OAM
|
Returns |
array |
|
get_ugid_array |
public array get_ugid_array()
|
|
Added by OAM
|
Returns |
array |
|