Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Os_db

module Os_db : sig..end

This module defines low level functions for database requests.


include Os_core_db
exception No_such_resource

Exception raised when no resource corresponds to the database request.

exception Wrong_password

Exception raised when password do not match.

exception Password_not_set

Exception raised when user has no password.

exception No_such_user

Exception raised when users attempts to connect with unknown identifier.

exception Empty_password

Exception raised when user attempts to connect with empty password.

exception Main_email_removal_attempt

Exception raised when there is an attempt to remove the main email.

exception Account_not_activated

Exception raised when the account is not activated.

val pwd_crypt_ref : 
  ((string -> string) * (Os_types.User.id -> string -> string -> bool))
  Stdlib.ref

pwd_crypt_ref is a reference to (f_crypt, f_check) where

  • f_crypt pwd is used to encrypt the password pwd.
  • f_check userid pwd hashed_pwd returns true if the hash of pwd and the hashed password hashed_pwd of the user with id userid match. If they don't match, it returns false.
module Email : sig..end

This module is used for low-level email management with database.

module User : sig..end

This module is used for low-level user management with database.

module Groups : sig..end

This module is low-level and used to manage groups of user.

module Phone : sig..end

Manage user phone numbers