예제 #1
0
파일: auth.py 프로젝트: cheshang/cheshang
 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')
예제 #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