Module Current_user.Opt
Instead of exception, the module Opt returns an option.
val get_current_user : unit -> Types.User.t optionget_current_user () returns the current user as a Types.User.t option type. If no user is connected, None is returned.
val get_current_userid : unit -> Types.User.id optionget_current_userid () returns the ID of the current user as an option. If no user is connected, None is returned.