コード例 #1
0
ファイル: user.py プロジェクト: bopopescu/spd_notebook
 def __init__(self, username, password='', email='', account_type='admin'):
     self.__username = username
     self.__password = crypt.crypt(password, SALT)
     self.__email = email
     self.__email_confirmed = False
     if not account_type in ['admin', 'user', 'guest']:
         raise ValueError, "account type must be one of admin, user, or guest"
     self.__account_type = account_type
     self.__conf = user_conf.UserConfiguration()
コード例 #2
0
 def __init__(self, username, password='', email='', account_type='admin'):
     self._username = username
     self.set_password(password)
     self._email = email
     self._email_confirmed = False
     if not account_type in ['admin', 'user', 'guest']:
         raise ValueError("account type must be one of admin, user, or guest")
     self._account_type = account_type
     self._conf = user_conf.UserConfiguration()
     self._temporary_password = ''
     self._is_suspended = False
     self._viewable_worksheets = set()