Skip to main content Link Search Menu Expand Document (external link)

5.1 GetUser


GetUser(username string, password string) (userdataptr *User, err error)

Obtains the User struct of a user who has already been initialized and returns a pointer to it.

Returns an error if:

  1. There is no initialized user for the given username.
  2. The user credentials are invalid.
  3. The User struct cannot be obtained due to malicious action, or the integrity of the user struct has been compromised.

Parameters

username (string), password (string)

Return

userdataptr (*User), err (error)


Do not forget that your design must satisfy all requirements, including:
  • The client application must not use the local filesystem.
  • Users can have multiple active user sessions at once.
  • You cannot use global variables to store user information.