def _login(self, user_id, mail, redirect=None): session = user_session(user_id) self.set_cookie('S', session) self.set_cookie('E', mail) if not redirect: current_user = Zsite.mc_get(user_id) redirect = LOGIN_REDIRECT%current_user.link self.redirect(redirect)
def _login(self, user_id, mail, redirect=None): session = user_session(user_id) self.set_cookie('S', session) self.set_cookie('E', mail) if not redirect: current_user = Zsite.mc_get(user_id) redirect = LOGIN_REDIRECT % current_user.link self.redirect(redirect)
def handler_verify(self, id, ck, delete=False): user_id, cid = verifyed(id, ck, delete) if user_id and self.cid == cid: session = user_session(user_id) self.set_cookie('S', session) return user_id else: self.redirect('/')
def get(self, avatar_id): session = user_session(avatar_id) self.set_cookie('S', session) next = self.get_argument('next', None) current_user = Zsite.mc_get(avatar_id) if next: self.redirect(next) else: self.redirect(current_user.link)
def _login(self, user_id): session = user_session(user_id) mail = mail_by_user_id(user_id) self.set_cookie('S', session) self.set_cookie('E', mail) current_user = Zsite.mc_get(user_id) redirect = LOGIN_REDIRECT%current_user.link self.redirect(redirect)
def _login(self, user_id): session = user_session(user_id) mail = mail_by_user_id(user_id) self.set_cookie('S', session) self.set_cookie('E', mail) current_user = Zsite.mc_get(user_id) redirect = LOGIN_REDIRECT % current_user.link self.redirect(redirect)