Documentation

UserManager extends StaticFactory

User Extended by Shawn Clake Class UserManager User Extended is licensed under the MIT license.

TODO: This class needs a complete refactor as its becoming a mess

Tags
author

Shawn Clake shawn.clake@gmail.com

link
https://github.com/ShawnClake/UserExtended
license

https://github.com/ShawnClake/UserExtended/blob/master/LICENSE MIT

Table of Contents

__callStatic()  : mixed
Main factory function which utilizes PHP's magic method to call a suffixed factory function on the child class.
checkForReopenAccount()  : mixed
Checks for a closed account and reopens it if there is one
checkForSuspendedAccount()  : bool
Checks whether an account is suspended and if it is, logs the user back out again
closeAccount()  : mixed
Closes the logged in users account
deleteAccount()  : mixed
Deletes an account. Data is NOT recoverable.
factory()  : mixed
Helper function which can also be used to simply create an instance of a child class in cases where initialization functions aren't needed.
getRandomUserSet()  : Collection
Returns a random set of users. This won't return users in our friends list.
loginUser()  : mixed
Logs in a user
loginUserObj()  : mixed
Used by 3rd party integrations to login
logoutUser()  : mixed
Logs out the currently logged in user
registerUser()  : mixed
Programatically registers a user
sendActivationEmail()  : void
Sends the activation email to a user Copied from the RainLab.Users Account component Altered by Shawn Clake
suspendAccount()  : mixed
Suspends a users account. Denies them from logging in
unSuspendAccount()  : mixed
Unsuspends a users account. Allows them to login again
updateUser()  : bool|
Updates a user
register()  : mixed
Registers the user Copied from the RainLab.Users Account component Altered by Shawn Clake

Methods

__callStatic()

Main factory function which utilizes PHP's magic method to call a suffixed factory function on the child class.

public static __callStatic( $name,  $arguments) : mixed
Parameters
$name :
$arguments :
Return values
mixed

checkForReopenAccount()

Checks for a closed account and reopens it if there is one

public static checkForReopenAccount( $data) : mixed
Parameters
$data :
Return values
mixed

checkForSuspendedAccount()

Checks whether an account is suspended and if it is, logs the user back out again

public static checkForSuspendedAccount( $user) : bool
Parameters
$user :
Return values
bool

closeAccount()

Closes the logged in users account

public static closeAccount() : mixed
Return values
mixed

deleteAccount()

Deletes an account. Data is NOT recoverable.

public static deleteAccount( $user) : mixed
Parameters
$user :
Return values
mixed

factory()

Helper function which can also be used to simply create an instance of a child class in cases where initialization functions aren't needed.

public static factory() : mixed

Generally you will want to use the static magic method below.

Return values
mixed

getRandomUserSet()

Returns a random set of users. This won't return users in our friends list.

public static getRandomUserSet([int $limit = 5 ]) : Collection
Parameters
$limit : int = 5
Return values
Collection

loginUser()

Logs in a user

public static loginUser(array<string|int, mixed> $data[, string $redirect_link = "" ]) : mixed
Parameters
$data : array<string|int, mixed>
$redirect_link : string = ""
Return values
mixed

loginUserObj()

Used by 3rd party integrations to login

public static loginUserObj( $user) : mixed
Parameters
$user :
Return values
mixed

logoutUser()

Logs out the currently logged in user

public static logoutUser() : mixed
Return values
mixed

registerUser()

Programatically registers a user

public static registerUser(array<string|int, mixed> $data[, array<string|int, mixed> $options = ['default' => true, 'timezone' => true] ]) : mixed
Parameters
$data : array<string|int, mixed>
$options : array<string|int, mixed> = ['default' => true, 'timezone' => true]
Tags
throws
Exception
Return values
mixed

sendActivationEmail()

Sends the activation email to a user Copied from the RainLab.Users Account component Altered by Shawn Clake

public static sendActivationEmail(User $user, mixed $link, mixed $code) : void
Parameters
$user : User
$link : mixed
$code : mixed
Return values
void

suspendAccount()

Suspends a users account. Denies them from logging in

public static suspendAccount( $user) : mixed
Parameters
$user :
Return values
mixed

unSuspendAccount()

Unsuspends a users account. Allows them to login again

public static unSuspendAccount( $user) : mixed
Parameters
$user :
Return values
mixed

updateUser()

Updates a user

public static updateUser(array<string|int, mixed> $data[, UserExtended|null $user = null ]) : bool|
Parameters
$data : array<string|int, mixed>
$user : UserExtended|null = null
Return values
bool|

register()

Registers the user Copied from the RainLab.Users Account component Altered by Shawn Clake

protected static register(array<string|int, mixed> $credentials[, bool $activate = false ]) : mixed
Parameters
$credentials : array<string|int, mixed>
$activate : bool = false
Return values
mixed

Search results