Allow disabling registration, add Interactive module with tools
This commit is contained in:
1 parent
92edb025fb
commit
4107d37106
2 files changed
+48
No files matched your search
@@ -60,6 +60,7 @@ defmodule SsoBsn.Accounts do
|
||||
|
||||
"""
|
||||
def register_user(attrs) do
|
||||
if not Application.get_env(:sso_bsn, :enable_registration, false), do: raise "Cannot register a user: disabled"
|
||||
%User{}
|
||||
|> User.registration_changeset(attrs)
|
||||
|> Repo.insert()
|
||||
|
||||
Reference in new issue
Block a user