Andrew's Web Libraries (AWL)
Loading...
Searching...
No Matches
User Class Reference
Inheritance diagram for User:
Collaboration diagram for User:

Public Member Functions

 __construct ( $id, $prefix="")
 
 AllowedTo ( $whatever)
 
 GetRoles ()
 
 Render ()
 
 RenderFields ($ef, $title=null)
 
 RenderRoles ( $ef, $title=null)
 
 Validate ()
 
 Write ()
 
 WriteRoles ()
 
- Public Member Functions inherited from DBRecord
 __construct ()
 
 Initialise ( $table, $keys=array())
 
 AddTable ( $table, $target_list, $join_clause, $and_where)
 
 PostToValues ( $prefix="")
 
 _BuildJoinClause ()
 
 _BuildFieldList ()
 
 _BuildWhereClause ($overwrite_values=false)
 
 Set ($fname, $fval)
 
 Get ($fname)
 
 Undefine ($fname)
 
 Read ()
 

Public Attributes

 $user_no
 
 $prefix
 
- Public Attributes inherited from DBRecord
 $Table
 
 $Fields
 
 $Keys
 
 $Values
 
 $WriteType
 
 $OtherTable
 
 $OtherTargets
 
 $OtherJoin
 
 $OtherWhere
 
 $EditMode
 

Detailed Description

Definition at line 34 of file User.php.

Constructor & Destructor Documentation

◆ __construct()

User::__construct (   $id,
  $prefix = "" 
)

#- The constructor initialises a new record, potentially reading it from the database.

Parameters
int$idThe user_no, or 0 if we are creating a new one
string$prefixThe prefix for entry fields

Definition at line 57 of file User.php.

Member Function Documentation

◆ AllowedTo()

User::AllowedTo (   $whatever)

Can the user do this?

Parameters
string$whateverWhat the user wants to do
Returns
boolean Whether they are allowed to.

First we globally short-circuit the 'admin can do anything'

Definition at line 98 of file User.php.

◆ GetRoles()

User::GetRoles ( )

Get the group memberships for the user

Definition at line 149 of file User.php.

◆ Render()

User::Render ( )

Render the form / viewer as HTML to show the user

Returns
string An HTML fragment to display in the page.

Definition at line 164 of file User.php.

◆ RenderFields()

User::RenderFields (   $ef,
  $title = null 
)

Render the core details to show to the user

Parameters
object$efThe entry form.
string$titleThe title to display above the entry fields.
Returns
string An HTML fragment to display in the page.

Definition at line 198 of file User.php.

◆ RenderRoles()

User::RenderRoles (   $ef,
  $title = null 
)

Render the user's administrative roles

Returns
string The string of html to be output

Definition at line 269 of file User.php.

◆ Validate()

User::Validate ( )

Validate the information the user submitted

Returns
boolean Whether the form data validated OK.

Definition at line 315 of file User.php.

◆ Write()

User::Write ( )

Write the User record.

Returns
Success.

Reimplemented from DBRecord.

Definition at line 349 of file User.php.

◆ WriteRoles()

User::WriteRoles ( )

Write the roles associated with the user

Returns
Success.

Definition at line 377 of file User.php.

Member Data Documentation

◆ $prefix

User::$prefix

Definition at line 48 of file User.php.

◆ $user_no

User::$user_no

Definition at line 42 of file User.php.


The documentation for this class was generated from the following file: