plug_mishka_auth v0.0.2 MishkaAuth.Client.Users.ClientUserQuery View Source
this module helps us to handle users and connect to users database.
Link to this section Summary
Functions
this function accepts info which is created by map and adds user in Users table.
this function accepts id which was created and deletes user in Users table.
this function accepts info which is created by map and updates user in Users table.
edit user password with his email
systematic user activation
get user info with mail
get user info with id
get user info with username
this function has two job that can check user existed and user activated. it uses email for this
this function has two job that can check user existed and user activated. it uses id for this
this function starts push notification in this module.
this function can help you check user password is valid or not.
Link to this section Types
Specs
data_uuid() :: Ecto.UUID.t()
Specs
email() :: String.t()
Specs
password() :: String.t()
Specs
unconfirmed_email() :: email() | nil
Specs
username() :: String.t()
Link to this section Functions
Specs
add_password(data_uuid(), password()) :: {:error, :add_password, :password_not_null | :user_not_found} | {:ok, :add_password, Ecto.Schema.t()} | {:error, :add_password, :data_input_problem, Ecto.Changeset.t()}
Specs
add_user(map()) :: {:error, :add_user, Ecto.Changeset.t()} | {:ok, :add_user, Ecto.Schema.t()}
this function accepts info which is created by map and adds user in Users table.
Specs
chack_password_not_null(password()) :: {:error, :chack_password_not_null} | {:ok, :chack_password_not_null}
Specs
check_user_and_password(binary(), any(), :email | :user_id | :username) :: {:error, :check_user_and_password, :current_password | :email | :null_password | :user_not_found | :username} | {:ok, :check_user_and_password, :email | :user_id | :username, Ecto.Schema.t()}
Specs
delete_password(data_uuid()) :: {:error, :delete_password, :null_password | :user_not_found} | {:ok, :delete_password, Ecto.Schema.t()}
Specs
delete_user(data_uuid()) :: {:error, :delete_user, :user_doesnt_exist} | {:ok, :delete_user, Ecto.Schema.t()} | {:error, :edit_user, :data_input_problem, Ecto.Changeset.t()} | {:error, :delete_user, :forced_to_delete}
this function accepts id which was created and deletes user in Users table.
Specs
edit_user(data_uuid(), map()) :: {:error, :edit_user, :user_doesnt_exist} | {:ok, :edit_user, Ecto.Schema.t()} | {:error, :edit_user, :data_input_problem, Ecto.Changeset.t()}
this function accepts info which is created by map and updates user in Users table.
Specs
edit_user_password(email(), map()) :: {:error, :edit_user_password, :user_not_found} | {:ok, :edit_user_password, Ecto.Schema.t()} | {:error, :edit_user_password, :data_input_problem, Ecto.Changeset.t()}
edit user password with his email
edit_user_password_with_user_id(user_id, old_password, new_password)
View SourceSpecs
edit_user_password_with_user_id(binary(), password(), password()) :: {:error, :edit_user_password_with_user_id, :current_password | :null_password | :user_not_found} | {:ok, :edit_user_password_with_user_id, Ecto.Schema.t()} | {:error, :edit_user_password_with_user_id, :data_input_problem, Ecto.Changeset.t()}
Specs
edit_user_verified_email(email()) :: {:ok, :edit_user_verified_email} | {:error, :edit_user_password, :user_not_found}
systematic user activation
Specs
find_user_with_email(email()) :: {:error, :find_user_with_email} | {:ok, :find_user_with_email, Ecto.Schema.t()}
get user info with mail
Specs
find_user_with_user_id(data_uuid()) :: {:error, :find_user_with_user_id} | {:ok, :find_user_with_user_id, Ecto.Schema.t()}
get user info with id
Specs
find_user_with_username(username()) :: {:error, :find_user_with_username} | {:ok, :find_user_with_username, Ecto.Schema.t()}
get user info with username
Specs
is_user_activated?(email()) :: {:error, :is_user_activated?, :user_not_activated | :user_not_found} | {:ok, :is_user_activated?, Ecto.Schema.t()}
this function has two job that can check user existed and user activated. it uses email for this
Specs
is_user_activated_with_id?(data_uuid()) :: {:error, :is_user_activated_with_id?, :user_not_activated | :user_not_found} | {:ok, :is_user_activated_with_id, Ecto.Schema.t()}
this function has two job that can check user existed and user activated. it uses id for this
Specs
reset_password(email(), String.t(), :email) :: {:error, :reset_password, :find_user_with_email} | {:ok, :reset_password, Ecto.Schema.t()}
Specs
reset_password(email(), String.t(), password(), :email) :: {:error, :reset_password, :same_code | :user_not_found} | {:ok, :reset_password, Ecto.Schema.t()} | {:error, :reset_password, :data_exist | :data_input_problem, String.t() | Ecto.Changeset.t()}
Specs
Specs
show_users() :: Ecto.Repo.t() | [Ecto.Schema.t()]
Specs
show_users(number(), number()) :: Scrivener.Page.t() | [] | [Ecto.Schema.t()]
Specs
show_users(number(), number(), any()) :: Scrivener.Page.t() | [] | [Ecto.Schema.t()]
Specs
subscribe() :: :ok | {:error, any()}
this function starts push notification in this module.
Specs
valid_password(Ecto.Schema.t(), password()) :: {:error, :valid_password} | {:ok, :valid_password}
this function can help you check user password is valid or not.
Specs
verify_email(email(), String.t(), :email) :: {:error, :verify_email, :find_user_with_email} | {:ok, :verify_email, Ecto.Schema.t()}