Mppm.User (mppm v0.1.1)
Link to this section Summary
Functions
Returns full %Mppm.User{} structure from database. The user will be created if it doesn't exist yet.
Encodes base 64 URL safe user login as used in-game to user UUID.
Encodes user UUID to base 64 URL safe user login as used in-game.
Link to this section Functions
Link to this function
add_role(user, role)
Link to this function
changeset(user, data \\ [])
Link to this function
get(user)
Returns full %Mppm.User{} structure from database. The user will be created if it doesn't exist yet.
Returns %Mppm.User{}
Link to this function
login_to_uuid(login)
Encodes base 64 URL safe user login as used in-game to user UUID.
Returns Ecto.UUID.t() :: <<_::288>>
### Examples
iex> Mppm.User.login_to_uuid("5FSqXc6ZS4mBFTKTE8rWNg")
"e454aa5d-ce99-4b89-8115-329313cad636"
Link to this function
new(uuid, login, nickname)
Link to this function
new_changeset(user, data)
Link to this function
remove_role(user, role)
Link to this function
set_administrator(user)
Link to this function
update_role(user, new_roles)
Link to this function
uuid_to_login(uuid)
Encodes user UUID to base 64 URL safe user login as used in-game.
Returns :string
### Examples
iex> Mppm.User.uuid_to_login("e454aa5d-ce99-4b89-8115-329313cad636")
"5FSqXc6ZS4mBFTKTE8rWNg"