Class User

Description

A class to handle reading, writing, viewing, editing and validating usr records.

Located in /User.php (line 34)

DBRecord
   |
   --User
Method Summary
 User User (int $id, [string $prefix = ""])
 boolean AllowedTo (string $whatever)
 void GetRoles ()
 string Render ()
 string RenderFields (object $ef, [string $title = null])
 string RenderRoles ( $ef, [ $title = null])
 boolean Validate ()
 Success. Write ()
 Success. WriteRoles ()
Variables

Inherited Variables

Inherited from DBRecord

DBRecord::$EditMode
Methods
Constructor User (line 57)

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

User User (int $id, [string $prefix = ""])
  • int $id: The user_no, or 0 if we are creating a new one
  • string $prefix: The prefix for entry fields
AllowedTo (line 98)

Can the user do this?

  • return: Whether they are allowed to.
boolean AllowedTo (string $whatever)
  • string $whatever: What the user wants to do
GetRoles (line 149)

Get the group memberships for the user

void GetRoles ()
Render (line 164)

Render the form / viewer as HTML to show the user

  • return: An HTML fragment to display in the page.
string Render ()
RenderFields (line 198)

Render the core details to show to the user

  • return: An HTML fragment to display in the page.
string RenderFields (object $ef, [string $title = null])
  • object $ef: The entry form.
  • string $title: The title to display above the entry fields.
RenderRoles (line 269)

Render the user's administrative roles

  • return: The string of html to be output
string RenderRoles ( $ef, [ $title = null])
  • $ef
  • $title
Validate (line 315)

Validate the information the user submitted

  • return: Whether the form data validated OK.
boolean Validate ()
Write (line 349)

Write the User record.

Success. Write ()

Redefinition of:
DBRecord::Write()
To write the record to the database
WriteRoles (line 377)

Write the roles associated with the user

Success. WriteRoles ()

Inherited Methods

Inherited From DBRecord

 DBRecord::DBRecord()
 DBRecord::AddTable()
 DBRecord::Get()
 DBRecord::Initialise()
 DBRecord::PostToValues()
 DBRecord::Read()
 DBRecord::Set()
 DBRecord::Undefine()
 DBRecord::Write()
 DBRecord::_BuildFieldList()
 DBRecord::_BuildJoinClause()
 DBRecord::_BuildWhereClause()

Documentation generated on Fri, 13 Jan 2012 23:40:17 +1300 by phpDocumentor 1.4.3