class UsersManagerModule extends Module (View source)

Class UsersManagerModule.

Properties

protected RequestRepository $request from  Module

Methods

__construct(RequestRepository $request)

Module constructor.

from  Module
getOptions(string $format)

No description

from  Module
mixed
getTokenAuth(string $userLogin, string $md5Password, string $format = null)

Gets the user's Authentication Token

setUserAccess(string $userLogin, string $access, array $idSites, string $format = null)

Assign an access role to a specified user for one or many site ids

addUser(string $userLogin, string $password, string $email, string $alias = null, string $initialIdSite = null, string $format = null)

Create a user

Details

__construct(RequestRepository $request)

Module constructor.

Parameters

RequestRepository $request

protected RequestOptions getOptions(string $format)

No description

Parameters

string $format

response format

Return Value

RequestOptions

mixed getTokenAuth(string $userLogin, string $md5Password, string $format = null)

Gets the user's Authentication Token

Parameters

string $userLogin

user login

string $md5Password

md5 hashed password

string $format

override format (defaults to one specified in config file)

Return Value

mixed

setUserAccess(string $userLogin, string $access, array $idSites, string $format = null)

Assign an access role to a specified user for one or many site ids

Parameters

string $userLogin

user login

string $access

user access role ({https://matomo.org/docs/manage-users/#advanced-user-management})

array $idSites

site ids to give the user access to

string $format

override format (defaults to one specified in config file)

addUser(string $userLogin, string $password, string $email, string $alias = null, string $initialIdSite = null, string $format = null)

Create a user

Parameters

string $userLogin

user login

string $password

user password

string $email

user email

string $alias

user alias (optional)

string $initialIdSite

initial site id to give access to

string $format

override format (defaults to one specified in config file)