Ejemplo n.º 1
0
    def confirm(self, member):
        """Move member into the confirmed workflow state"""
        member = IHandleMemberWorkflow(member)
        if not member.is_unconfirmed():
            self.addPortalStatusMessage(_(u'psm_not_pending_account',
                                          u'You have tried to activate an account that is not pending confirmation. Please sign in normally.'))
            return False

        member.confirm()
        return True
Ejemplo n.º 2
0
def readme_setup(tc):
    setSite(tc.portal)
    tc._refreshSkinData()
    tc.homepage = getattr(tc.portal, 'site-home')
    tc.request = tc.app.REQUEST
    member = tc.portal.portal_membership.getAuthenticatedMember()
    member.update(email='*****@*****.**')
    member = IHandleMemberWorkflow(member)
    if member.is_unconfirmed():
        member.confirm()
    setSite(tc.portal)
Ejemplo n.º 3
0
    def confirm(self, targets, fields):
        members = get_tool(self.context, 'portal_memberdata')

        result = []

        for id in targets:
            member = IWorkflowed(members[id])
            if member.is_unconfirmed:
                member.confirm()

                result.append(id)

        ### XXX TODO i18n
        self.add_status_message('confirmed %d accounts' % len(result))
        return self.redirect(self.context.absolute_url() + '/review_members')