Oups, add a lot of missing files
This commit is contained in:
parent
d234d83df8
commit
061e73722f
21 changed files with 937 additions and 2 deletions
27
modules/qcm/User.py
Normal file
27
modules/qcm/User.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# coding=utf-8
|
||||
|
||||
USERS = None
|
||||
|
||||
class User:
|
||||
def __init__(self, iden):
|
||||
global USERS
|
||||
if iden in USERS.index:
|
||||
self.node = USERS.index[iden]
|
||||
else:
|
||||
self.node = { "username":"N/A", "email":"N/A" }
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self.node["xml:id"]
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self.node["username"]
|
||||
|
||||
@property
|
||||
def email(self):
|
||||
return self.node["email"]
|
||||
|
||||
@property
|
||||
def validated(self):
|
||||
return int(self.node["validated"]) > 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue