PHP Class UserController, vanilla

Author: ramon
Mostrar archivo Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$Form Gdn_Form
$Uses Models to automatically instantiate.

Public Methods

Method Description
add ( ) Create a user.
applicantCount ( ) Show how many applicants are in the queue.
applicants ( ) Show applicants queue.
approve ( integer $UserID = '' ) Approve a user application.
authenticate ( )
autoComplete ( ) Autocomplete a username.
ban ( type $UserID, $Unban = false ) Ban a user and optionally delete their content.
browse ( mixed $Keywords = '', integer $Page = '', string $Order = '' ) Page thru user list.
decline ( integer $UserID = '' ) Decline a user application.
delete ( integer $UserID = '', string $Method = '' ) Delete a user account.
delete2 ( )
deleteContent ( $UserID )
edit ( integer $UserID ) Edit a user account.
emailAvailable ( string $Email = '' ) Determine whether user can register with this email address.
index ( mixed $Keywords = '', integer $Page = '', string $Order = '' ) User management list.
initialize ( ) Highlight menu path. Automatically run on every use.
merge ( )
save ( )
sso ( boolean $UserID = false )
summary ( string $SortField = 'DateLastActive', string $SortDirection = 'desc', integer $Limit = 30, integer $Offset ) Convenience function for listing users. At time of this writing, it is being used by wordpress widgets to display recently active users.
tagSearch ( $q, integer $limit = 10 ) JSON output of a username search.
usernameAvailable ( string $Name = '' ) Determine whether user can register with this username.
verify ( $UserID, $Verified )

Protected Methods

Method Description
_getFilter ( ) Get filter from current request.
_orderUrl ( string $Field ) : string Build URL to order users by value passed.

Private Methods

Method Description
handleApplicant ( string $Action, integer $UserID ) : boolean Handle a user application.

Method Details

_getFilter() protected method

Get filter from current request.
Since: 2.0.0
protected _getFilter ( )

_orderUrl() protected method

Build URL to order users by value passed.
Since: 2.0.0
protected _orderUrl ( string $Field ) : string
$Field string Column to order users by.
return string URL of user list with orderby query appended.

add() public method

Create a user.
Since: 2.0.0
public add ( )

applicantCount() public method

Show how many applicants are in the queue.
Since: 2.0.0
public applicantCount ( )

applicants() public method

Show applicants queue.
Since: 2.0.0
public applicants ( )

approve() public method

Approve a user application.
Since: 2.0.0
public approve ( integer $UserID = '' )
$UserID integer Unique ID.

authenticate() public method

public authenticate ( )

autoComplete() public method

Autocomplete a username.
Since: 2.0.0
public autoComplete ( )

ban() public method

Ban a user and optionally delete their content.
Since: 2.1
public ban ( type $UserID, $Unban = false )
$UserID type

browse() public method

Page thru user list.
Since: 2.0.0
public browse ( mixed $Keywords = '', integer $Page = '', string $Order = '' )
$Keywords mixed Term or list of terms to limit search.
$Page integer Page number.
$Order string Sort order.

decline() public method

Decline a user application.
Since: 2.0.0
public decline ( integer $UserID = '' )
$UserID integer Unique ID.

delete() public method

Delete a user account.
Since: 2.0.0
public delete ( integer $UserID = '', string $Method = '' )
$UserID integer Unique ID.
$Method string Type of deletion to do (delete, keep, or wipe).

delete2() public method

public delete2 ( )

deleteContent() public method

public deleteContent ( $UserID )
$UserID

edit() public method

Edit a user account.
Since: 2.0.0
public edit ( integer $UserID )
$UserID integer Unique ID.

emailAvailable() public method

Determine whether user can register with this email address.
Since: 2.0.0
public emailAvailable ( string $Email = '' )
$Email string Email address to be checked.

index() public method

User management list.
Since: 2.0.0
public index ( mixed $Keywords = '', integer $Page = '', string $Order = '' )
$Keywords mixed Term or array of terms to filter list of users.
$Page integer Page number.
$Order string Sort order for list.

initialize() public method

Highlight menu path. Automatically run on every use.
Since: 2.0.0
public initialize ( )

merge() public method

public merge ( )

save() public method

public save ( )

sso() public method

public sso ( boolean $UserID = false )
$UserID boolean

summary() public method

Convenience function for listing users. At time of this writing, it is being used by wordpress widgets to display recently active users.
Since: 2.0.?
public summary ( string $SortField = 'DateLastActive', string $SortDirection = 'desc', integer $Limit = 30, integer $Offset )
$SortField string The field to sort users with. Defaults to DateLastActive. Other options are: DateInserted, Name.
$SortDirection string The direction to sort the users.
$Limit integer The number of users to show.
$Offset integer The offset to start listing users at.

tagSearch() public method

JSON output of a username search.
public tagSearch ( $q, integer $limit = 10 )
$limit integer

usernameAvailable() public method

Determine whether user can register with this username.
Since: 2.0.0
public usernameAvailable ( string $Name = '' )
$Name string Username to be checked.

verify() public method

public verify ( $UserID, $Verified )
$UserID
$Verified

Property Details

$Form public_oe property

public Gdn_Form $Form
return Gdn_Form

$Uses public_oe property

Models to automatically instantiate.
public $Uses