Fix user creation
This commit is contained in:
1 parent
d7641c2da4
commit
8f623a264d
1 file changed
+2
-2
@@ -79,7 +79,7 @@ class UserCreate(AllowAdmin, CheckEmailMixin, BackToUsersMixin, BaseTemplateGetV
|
||||
passwordhash = hash_password(self.password)
|
||||
try:
|
||||
create_user(
|
||||
self.email, passwordhash, self.enabled, self.is_admin, self.note
|
||||
self.email, passwordhash, self.enabled, self.can_receive, self.is_admin, self.note
|
||||
)
|
||||
except EmailAlreadyExists as e:
|
||||
if self.auth_user.is_admin:
|
||||
@@ -96,7 +96,7 @@ class UserCreate(AllowAdmin, CheckEmailMixin, BackToUsersMixin, BaseTemplateGetV
|
||||
|
||||
def get_context(self):
|
||||
context = super().get_context()
|
||||
for key in ("email", "password", "enabled", "is_admin", "note"):
|
||||
for key in ("email", "password", "enabled", "can_receive", "is_admin", "note"):
|
||||
if hasattr(self, key):
|
||||
context[key] = getattr(self, key)
|
||||
return context
|
||||
|
||||
Reference in new issue
Block a user