Exemplo n.º 1
0
    def _process(self):

        av = AvatarHolder().getById(self._userId)
        if av.isActivated():
            p = signIn.WPAccountAlreadyActivated(self, av)
            return p.display()
            #return "your account is already activated"
        if av.isDisabled():
            p = signIn.WPAccountDisabled(self, av)
            return p.display()
            #return "your account is disabled. please, ask to enable it"
        elif self._key == av.getKey():
            av.activateAccount()
            #----Grant any kind of rights if anything
            ph = pendingQueues.PendingQueuesHolder()
            ph.grantRights(av)
            #-----
            p = signIn.WPAccountActivated(self, av)
            return p.display()
            #return "Your account is activate now"
        else:
            return "Wrong key. Please, ask for a new one"
            pass
Exemplo n.º 2
0
 def _process(self):
     av = AvatarHolder().getById(self._userId)
     p = signIn.WPAccountDisabled(self, av)
     return p.display()