Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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('/')
Ejemplo n.º 4
0
 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('/')
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
    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)
Ejemplo n.º 7
0
    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)