Exemplo n.º 1
0
 def register(self, username, password, email):
     error = userdb.register_user(username, password, email)
     if error is None:
         self.logger.info("Registered user %s.", username)
         self.do_login(username)
     else:
         self.logger.info("Registration attempt failed for username %s: %s",
                          username, error)
         self.send_message("register_fail", reason=error)
Exemplo n.º 2
0
 def register(self, username, password, email):
     error = userdb.register_user(username, password, email)
     if error is None:
         self.logger.info("Registered user %s.", username)
         self.do_login(username)
     else:
         self.logger.info("Registration attempt failed for username %s: %s",
                          username, error)
         self.send_message("register_fail", reason = error)