Use getattr in user creation
This commit is contained in:
parent
c982364041
commit
51a5f7e9ad
|
@ -95,11 +95,11 @@ def create_user(username, displayname, email):
|
||||||
|
|
||||||
# Fill out the new user
|
# Fill out the new user
|
||||||
with config.json_rw(user_dir, 'config.json') as cfg:
|
with config.json_rw(user_dir, 'config.json') as cfg:
|
||||||
cfg['uid'] = uid
|
cfg.uid = uid
|
||||||
cfg['username'] = username
|
cfg.username = username
|
||||||
cfg['displayname'] = displayname
|
cfg.displayname = displayname
|
||||||
cfg['email'] = email
|
cfg.email = email
|
||||||
cfg['created'] = int(time.time())
|
cfg.created = int(time.time())
|
||||||
|
|
||||||
# Update the index with the new user
|
# Update the index with the new user
|
||||||
with config.json_rw('user', 'index.json') as index:
|
with config.json_rw('user', 'index.json') as index:
|
||||||
|
|
Loading…
Reference in New Issue