summaryrefslogtreecommitdiffstats
path: root/accounts/backend/user/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/backend/user/__init__.py')
-rw-r--r--accounts/backend/user/__init__.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/accounts/backend/user/__init__.py b/accounts/backend/user/__init__.py
index af0cc63..57ba952 100644
--- a/accounts/backend/user/__init__.py
+++ b/accounts/backend/user/__init__.py
@@ -107,9 +107,15 @@ class Backend(object):
def register(self, account):
"""
- Persists an account in the backend.
+ Register a new user account.
+
+ This message checks the given account for plausibility,
+ get a new uidNumber and store the account into the backend.
"""
- raise NotImplementedError()
+ if account.password is None:
+ raise ValueError("Password required for register")
+
+ self._store(account)
def update(self, account, as_admin=False):
"""
@@ -122,3 +128,9 @@ class Backend(object):
Deletes an account permanently.
"""
raise NotImplementedError()
+
+ def _store(self, account):
+ """
+ Persists an account in the backend.
+ """
+ raise NotImplementedError()