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
with config.json_rw(user_dir, 'config.json') as cfg:
cfg['uid'] = uid
cfg['username'] = username
cfg['displayname'] = displayname
cfg['email'] = email
cfg['created'] = int(time.time())
cfg.uid = uid
cfg.username = username
cfg.displayname = displayname
cfg.email = email
cfg.created = int(time.time())
# Update the index with the new user
with config.json_rw('user', 'index.json') as index: