Documentation

UserView extends View
in package

User View

Tags
author

Guillaume ARNOUX

Table of Contents

$access_level  : int
$container  : Container
$request  : Request
$secret  : string
$user  : User|null
__construct()  : mixed
UserView constructor
encode()  : string
JSON Encoding method
render()  : string
Render the page
with2FA()  : $this
Add 2fa key to view
edit()  : void
[NEXISTS] Edit user function
requestAuth()  : string
Display the general auth page
show()  : string
Display the profile page
deleteAccount()  : string
Display the 2fa enabling page
enable2FA()  : string
Display the 2fa enabling page
forgotPassword()  : string
Display forgot password page
getHeaderInfo()  : string
Get the info parameter in the request
login()  : string
Display login page
manage2FA()  : string
Display the 2fa manage page
recover2FA()  : string
Display the 2fa recover page
register()  : string
Display the register page
resetPassword()  : string
Display reset password page
show2FACodes()  : string
Display the 2fa rescue codes page
showCreators()  : string
Display the creators page
showHome()  : string
Display the home page
showInList()  : string
Display the profile of user for include in a list
showPublicLists()  : string
Display the public lists page
sidebar()  : string
Display the sidebar

Properties

$access_level

protected int $access_level

depends on the users permissions

$container

protected Container $container

$request

protected Request $request

$secret

private string $secret

2fa secret key

Methods

__construct()

UserView constructor

public __construct(Container $c[, User|null $user = NULL ][, Request|null $request = null ]) : mixed
Parameters
$c : Container
$user : User|null = NULL
$request : Request|null = null
Return values
mixed

encode()

JSON Encoding method

public encode(int $access_level) : string
Parameters
$access_level : int

depends on the user's privileges

Return values
string

json encoded string of the object

render()

Render the page

public render(int $method[, int $access_level = Renderer::OTHER_MODE ]) : string
Parameters
$method : int

method to render

$access_level : int = Renderer::OTHER_MODE

access level of the user

Tags
throws
ForbiddenException
Return values
string

html code

with2FA()

Add 2fa key to view

public with2FA(string $secret) : $this
Parameters
$secret : string

2fa key

Return values
$this

self

edit()

[NEXISTS] Edit user function

protected edit() : void
Tags
throws
ForbiddenException

because not exists (cannot modify a user separately)

Return values
void

requestAuth()

Display the general auth page

protected requestAuth(Model $model) : string
Parameters
$model : Model

associated model (list, item or user)

Tags
throws
ForbiddenException
Return values
string

html code

show()

Display the profile page

protected show() : string
Return values
string

html code

deleteAccount()

Display the 2fa enabling page

private deleteAccount() : string
Return values
string

html code

enable2FA()

Display the 2fa enabling page

private enable2FA() : string
Return values
string

html code

forgotPassword()

Display forgot password page

private forgotPassword() : string
Return values
string

html code

getHeaderInfo()

Get the info parameter in the request

private getHeaderInfo() : string
Return values
string

info parameter

login()

Display login page

private login([false $authenticator = false ]) : string
Parameters
$authenticator : false = false

at true if user uses 2fa

Return values
string

html code

manage2FA()

Display the 2fa manage page

private manage2FA() : string
Return values
string

recover2FA()

Display the 2fa recover page

private recover2FA() : string
Return values
string

html code

register()

Display the register page

private register() : string
Return values
string

html code

resetPassword()

Display reset password page

private resetPassword() : string
Return values
string

html code

show2FACodes()

Display the 2fa rescue codes page

private show2FACodes() : string
Return values
string

html code

showCreators()

Display the creators page

private showCreators() : string
Tags
throws
ForbiddenException

error while render

Return values
string

html code

showHome()

Display the home page

private showHome() : string
Return values
string

html code

showInList()

Display the profile of user for include in a list

private showInList() : string
Return values
string

html code

showPublicLists()

Display the public lists page

private showPublicLists() : string
Tags
throws
ForbiddenException

error while render

Return values
string

html code

sidebar()

Display the sidebar

private sidebar() : string
Return values
string

html code

Search results