title | footer |
---|---|
\leantime\domain\services\users |
false |
- Full name:
\leantime\domain\services\users
public users::__construct(): mixed
Return Value:
public users::getProfilePicture(mixed $id): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
id |
mixed |
Return Value:
public users::editUser(mixed $values, mixed $id): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
values |
mixed | |
id |
mixed |
Return Value:
public users::getNumberOfUsers(): mixed
Return Value:
public users::getAll(): mixed
Return Value:
public users::getUser(mixed $id): array|bool
Parameters:
Parameter | Type | Description |
---|---|---|
id |
mixed |
Return Value:
public users::getUserByEmail(mixed $email): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
email |
mixed |
Return Value:
public users::getAllBySource(mixed $source): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
source |
mixed |
Return Value:
public users::setProfilePicture(mixed $photo, mixed $id): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
photo |
mixed | |
id |
mixed |
Return Value:
public users::updateUserSettings(mixed $category, mixed $setting, mixed $value): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
category |
mixed | |
setting |
mixed | |
value |
mixed |
Return Value:
checkPasswordStrength - Checks password strength for minimum requirements Current requirements are: Password must be at least 8 characters in length.
public users::checkPasswordStrength(string $password): bool
Password must include at least one upper case letter. Password must include at least one number. Password must include at least one special character.
Parameters:
Parameter | Type | Description |
---|---|---|
password |
string | The string to be checked |
Return Value:
returns true if password meets requirements
createUserInvite - generates a new invite token, creates the user in the db and sends the invitation email
public users::createUserInvite(array $values): bool|int
TODO: Should accept userModel
Parameters:
Parameter | Type | Description |
---|---|---|
values |
array | basic user values |
Return Value:
returns new user id on success, false on failure
addUser - simple service wrapper to create a new user
public users::addUser(array $values): bool|int
TODO: Should accept userModel
Parameters:
Parameter | Type | Description |
---|---|---|
values |
array | basic user values |
Return Value:
returns new user id on success, false on failure
usernameExist - Checks if a given username (email) is already in the db
public users::usernameExist(string $username, int $notUserId = ''): bool
TODO: Should accept userModel
Parameters:
Parameter | Type | Description |
---|---|---|
username |
string | username |
notUserId |
int | optional userId to skip. (used when changing email addresses to a new one, skips checking the old one) |
Return Value:
returns true or false
getUsersWithProjectAccess - gets all users who can access a project
public users::getUsersWithProjectAccess(int $currentUser, int $projectId): array
TODO: Should return usermodel
Parameters:
Parameter | Type | Description |
---|---|---|
currentUser |
int | user who is trying to access the project |
projectId |
int | project id |
Return Value:
returns array of users
Automatically generated from source code comments on 2023-02-28 using phpDocumentor