Rename PDB.register_user -> new_user.
I was treating User a little bit special here, but I prefer to have the more consistent terminology.
This commit is contained in:
parent
1fc2ed09f5
commit
854fa4db51
2 changed files with 2 additions and 2 deletions
|
@ -1072,7 +1072,7 @@ class PDBUserMixin:
|
||||||
|
|
||||||
@decorators.required_feature('user.new')
|
@decorators.required_feature('user.new')
|
||||||
@decorators.transaction
|
@decorators.transaction
|
||||||
def register_user(self, username, password, *, display_name=None):
|
def new_user(self, username, password, *, display_name=None):
|
||||||
# These might raise exceptions.
|
# These might raise exceptions.
|
||||||
self.assert_valid_username(username)
|
self.assert_valid_username(username)
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ def post_register():
|
||||||
}
|
}
|
||||||
return jsonify.make_json_response(response, status=422)
|
return jsonify.make_json_response(response, status=422)
|
||||||
|
|
||||||
user = common.P.register_user(username, password_1, display_name=display_name)
|
user = common.P.new_user(username, password_1, display_name=display_name)
|
||||||
|
|
||||||
session = sessions.Session(request, user)
|
session = sessions.Session(request, user)
|
||||||
session_manager.add(session)
|
session_manager.add(session)
|
||||||
|
|
Loading…
Reference in a new issue