PHP Class UserController, vanilla

Author: ramon
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Свойство Type Description
$Form Gdn_Form
$Uses Models to automatically instantiate.

Méthodes publiques

Méthode 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 )

Méthodes protégées

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

Private Methods

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

Method Details

_getFilter() protected méthode

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

_orderUrl() protected méthode

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

add() public méthode

Create a user.
Since: 2.0.0
public add ( )

applicantCount() public méthode

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

applicants() public méthode

Show applicants queue.
Since: 2.0.0
public applicants ( )

approve() public méthode

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

authenticate() public méthode

public authenticate ( )

autoComplete() public méthode

Autocomplete a username.
Since: 2.0.0
public autoComplete ( )

ban() public méthode

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

browse() public méthode

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 méthode

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

delete() public méthode

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 méthode

public delete2 ( )

deleteContent() public méthode

public deleteContent ( $UserID )
$UserID

edit() public méthode

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

emailAvailable() public méthode

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 méthode

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 méthode

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

merge() public méthode

public merge ( )

save() public méthode

public save ( )

sso() public méthode

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

summary() public méthode

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 méthode

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

usernameAvailable() public méthode

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

verify() public méthode

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

Property Details

$Form public_oe property

public Gdn_Form $Form
Résultat Gdn_Form

$Uses public_oe property

Models to automatically instantiate.
public $Uses