Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
User.SigSourceinclude Sihl_core.Container.Service.Sigval lifecycle : Sihl_core.Container.Lifecycle.tval find_all :
query:Sihl_type.Database.Ql.t ->
(Sihl_type.User.t list * Sihl_type.Database.Meta.t) Lwt.tval find_opt : user_id:string -> Sihl_type.User.t option Lwt.tval find : user_id:string -> Sihl_type.User.t Lwt.tval find_by_email : email:string -> Sihl_type.User.t Lwt.tval find_by_email_opt : email:string -> Sihl_type.User.t option Lwt.tval update_password :
?password_policy:(string -> (unit, string) Result.t) ->
user:Sihl_type.User.t ->
old_password:string ->
new_password:string ->
new_password_confirmation:string ->
unit ->
(Sihl_type.User.t, string) Result.t Lwt.tval update_details :
user:Sihl_type.User.t ->
email:string ->
username:string option ->
Sihl_type.User.t Lwt.tval set_password :
?password_policy:(string -> (unit, string) Result.t) ->
user:Sihl_type.User.t ->
password:string ->
password_confirmation:string ->
unit ->
(Sihl_type.User.t, string) Result.t Lwt.tSet the password of a user without knowing the old password.
This feature is typically used by admins.
val create_user :
email:string ->
password:string ->
username:string option ->
Sihl_type.User.t Lwt.tCreate and store a user.
val create_admin :
email:string ->
password:string ->
username:string option ->
Sihl_type.User.t Lwt.tCreate and store a user that is also an admin.
val register_user :
?password_policy:(string -> (unit, string) result) ->
?username:string ->
email:string ->
password:string ->
password_confirmation:string ->
unit ->
(Sihl_type.User.t, Sihl_type.User.Error.t) Result.t Lwt.tCreate and store new user.
Provide password_policy to check whether the password fulfills certain criteria.
val login :
email:string ->
password:string ->
(Sihl_type.User.t, Sihl_type.User.Error.t) Result.t Lwt.tFind user by email if password matches.
val register : unit -> Sihl_core.Container.Service.tmodule Seed : sig ... end