Ejemplo n.º 1
0
 def POST(self):
     u = self.argument('u')
     p = self.argument('p')
     uid = uid_by_email(u)
     if passwd_verify(uid, p):
         self.login(uid)
     return self.redirect('/me')
Ejemplo n.º 2
0
def account_new(email, passwd, name):
    email = email.lower()
    if uid_by_email(email):
        return
    uid = uid_new()
    email_save(uid, email)
    passwd_save(uid, passwd)
    profile_new(uid, name=name)
    return uid