Overview

Packages

  • awl
    • AuthPlugin
    • AwlDatabase
    • Browser
    • classEditor
    • DataEntry
    • DataUpdate
    • EMail
    • iCalendar
    • MenuSet
    • PgQuery
    • Session
    • Translation
    • User
    • Utilities
    • Validation
    • vCalendar
    • vComponent
    • XMLDocument
    • XMLElement
  • None

Classes

  • User
  • Overview
  • Package
  • Class

Class User

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

DBRecord
Extended by User
Package: awl\User
Copyright: Catalyst IT Ltd, Morphoss Ltd http://www.morphoss.com/
License: GNU GPL v2 or later
Author: Andrew McMillan andrew@mcmillan.net.nz
Located at User.php
Methods summary
public
# User( integer $id, string $prefix = "" )

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

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

Parameters

$id
The user_no, or 0 if we are creating a new one
$prefix
The prefix for entry fields
public boolean
# AllowedTo( string $whatever )

Can the user do this?

Can the user do this?

Parameters

$whatever
What the user wants to do

Returns

boolean
Whether they are allowed to.
public
# GetRoles( )

Get the group memberships for the user

Get the group memberships for the user

public string
# Render( )

Render the form / viewer as HTML to show the user

Render the form / viewer as HTML to show the user

Returns

string
An HTML fragment to display in the page.
public string
# RenderFields( object $ef, string $title = null )

Render the core details to show to the user

Render the core details to show to the user

Parameters

$ef
The entry form.
$title
The title to display above the entry fields.

Returns

string
An HTML fragment to display in the page.
public string
# RenderRoles( $ef, $title = null )

Render the user's administrative roles

Render the user's administrative roles

Returns

string
The string of html to be output
public boolean
# Validate( )

Validate the information the user submitted

Validate the information the user submitted

Returns

boolean
Whether the form data validated OK.
public Success.
# Write( )

Write the User record.

Write the User record.

Returns

Success.

Overrides

DBRecord::Write()
public Success.
# WriteRoles( )

Write the roles associated with the user

Write the roles associated with the user

Returns

Success.
Methods inherited from DBRecord
AddTable(), DBRecord(), Get(), Initialise(), PostToValues(), Read(), Set(), Undefine(), _BuildFieldList(), _BuildJoinClause(), _BuildWhereClause()
Properties summary
public string $user_no

A unique user number that is auto assigned on creation and invariant thereafter

A unique user number that is auto assigned on creation and invariant thereafter

#
public string $prefix

Something to prefix all field names with before rendering them.

Something to prefix all field names with before rendering them.

#
Properties inherited from DBRecord
$EditMode, $Fields, $Keys, $OtherJoin, $OtherTable, $OtherTargets, $OtherWhere, $Table, $Values, $WriteType
API documentation generated by ApiGen