Use getattr in user creation

This commit is contained in:
Tim Van Baak 2020-01-20 17:23:40 -08:00
parent c982364041
commit 51a5f7e9ad
1 changed files with 5 additions and 5 deletions

View File

@ -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: