|
FORCEINLINE bool | IsValid () const |
| The user is considered valid if the username is not empty or consists of only whitespace characters.
|
|
FORCEINLINE bool | IsRegisteredValid () const |
| The user is considered valid if their username is not empty and their email and password properties are not empty.
|
|
FORCEINLINE bool | IsCompleteProfile () const |
| Checks if the user has a complete profile.
|
|
FORCEINLINE FOperatingSystemUniqueId | GetUserUniqueId () const |
| Generates a unique identifier for the user based on their username and email. The email is formatted by replacing "@" with "_" before combining it with the username.
|
|
FORCEINLINE void | Reset () |
| Resets the user's information.
|
|
FORCEINLINE bool | UpdateColorIfInvalid () |
| Updates the UserColor if it is invalid.
|
|
void | UpdateDetails (const FOperatingSystemUser &NewDetails) |
| Updates the details of an operating system user.
|
|
FORCEINLINE bool | CanReceiveEmails () const |
| Checks if the user can receive emails.
|
|
FORCEINLINE FOperatingSystemUser & | operator= (const FOperatingSystemUser &Other) |
|
FORCEINLINE bool | operator== (const FOperatingSystemUser &Other) const |
|
FORCEINLINE bool | operator!= (const FOperatingSystemUser &Other) const |
|
| FOperatingSystemUser () |
|
| FOperatingSystemUser (const FText &Username) |
|
| FOperatingSystemUser (const FText &Username, const UObject *Icon) |
|
| FOperatingSystemUser (const FText &Username, const FText &Password) |
|
| FOperatingSystemUser (const FText &Username, const FText &Password, const UObject *Icon) |
|
| FOperatingSystemUser (const FText &Username, const FText &Password, const FText &Email, const FText &FirstName, const FText &LastName) |
|
| FOperatingSystemUser (const FText &Username, const FText &Password, const FText &Email, const FText &FirstName, const FText &LastName, const bool bCanReceiveEmails) |
|
| FOperatingSystemUser (const FString &Username) |
|
| FOperatingSystemUser (const FString &Username, const UObject *Icon) |
|
| FOperatingSystemUser (const FString &Username, const FString &Password) |
|
| FOperatingSystemUser (const FString &Username, const FString &Password, const UObject *Icon) |
|
| FOperatingSystemUser (const FString &Username, const FString &Password, const FString &Email, const FString &FirstName, const FString &LastName) |
|
| FOperatingSystemUser (const FString &Username, const FString &Password, const FString &Email, const FString &FirstName, const FString &LastName, const bool bCanReceiveEmails) |
|
Represents a user in the operating system simulator.
This struct stores information about a user, such as their username, password, email, first name, last name, and icon.
The user can be registered and have a complete profile, which are determined by the presence of the required information. The user can also receive emails if the flag is set to true.
FORCEINLINE void FOperatingSystemUser::Reset |
( |
| ) |
|
|
inline |
Resets the user's information.
This method sets all of the user's variables to their default values.
The variables that are reset include the username, password, email, first name, last name, and icon. The icon is reset using the Reset() method.
In addition, the list of owned program identifiers is also reset.
FORCEINLINE bool FOperatingSystemUser::UpdateColorIfInvalid |
( |
| ) |
|
|
inline |
Updates the UserColor if it is invalid.
This method checks if the UserColor is invalid, i.e., equal to FLinearColor::Transparent, and if the user is valid. If both conditions are met, it generates a random color using FLinearColor::MakeRandomColor() and sets the alpha value to 1.0. It then returns true to indicate that the color was updated. If the conditions are not met, it returns false.
- Returns
- True if the UserColor was updated, false otherwise.
Updates the details of an operating system user.
This method updates the specified user's details by replacing the existing values with the non-empty values provided in the given NewDetails
object. The user's email, password, username, first name, and last name will be updated if provided. The user's icon will also be updated if a non-null icon is provided. The user's owned program identifiers will be updated if the list is not empty.
- Parameters
-
NewDetails | The FOperatingSystemUser object containing the updated details.
NewDetails.Email : The new email address for the user (optional).
NewDetails.Password : The new password for the user (optional).
NewDetails.Username : The new username for the user (optional).
NewDetails.FirstName : The new first name for the user (optional).
NewDetails.LastName : The new last name for the user (optional).
NewDetails.Icon : The new icon for the user (optional).
NewDetails.OwnedProgramIdentifiers : The new list of owned program identifiers for the user (optional).
|
- Note
- The provided
NewDetails
object may have empty or null values for some properties. Only non-empty values will be used to update the user's details.