Spear.change_user_password
You're seeing just the function
change_user_password
, go back to Spear module for more information.
Link to this function
change_user_password(conn, login_name, current_password, new_password, opts \\ [])
View SourceSpecs
change_user_password( connection :: Spear.Connection.t(), login_name :: String.t(), current_password :: String.t(), new_password :: String.t(), opts :: Keyword.t() ) :: :ok | {:error, any()}
Changes a user's password by providing the current password
This can be accomplished regardless of the current credentials since the user's current password is provided.
Options
All options are passed to Spear.request/5
.
Examples
iex> Spear.create_user(conn, "Aladdin", "aladdin", "changeit", ["$ops"])
:ok
iex> Spear.change_user_password(conn, "aladdin", "changeit", "open sesame")
:ok