Esempio n. 1
0
 def post_validate(self, REQUEST, errors):
     FolderishMember.post_validate(self, REQUEST, errors)
     form = REQUEST.form
     if form.has_key('password'):
         password = form.get('password', None)
         confirm = form.get('confirm_password', None)
         
         if not errors.get('password', None):
             if password and password == 'password':
                 errors['password'] = \
                     self.translate('id_pass_password',
                                    default='"password" is not a valid password.',
                                    domain='remember-plone')
Esempio n. 2
0
    def __bobo_traverse__(self, REQUEST, name):
        """Transparent access to image scales
           **adapted from ATCT**
        """
        if name.startswith('portrait'):
            field = self.getField('portrait')
            image = None
            if name == 'portrait':
                image = field.getScale(self)
            else:
                scalename = name[len('portrait_'):]
                if scalename in field.getAvailableSizes(self):
                    image = field.getScale(self, scale=scalename)
            if image is not None and not isinstance(image, basestring):
                # image might be None or '' for empty images
                return image

        return FolderishMember.__bobo_traverse__(self, REQUEST, name)
Esempio n. 3
0
 def register(self):
     FolderishMember.register(self)
     notify(MemberRegisteredEvent(self))
Esempio n. 4
0
 def indexObject(self):
     if self.isTemporary():
         return
     FolderishMember.indexObject(self)