Changements cosmétiques : arrondis sur les étiquettes d'onglets. Pointillés.
[Plinn.git] / MembershipTool.py
index d60ed39..2cfefe6 100755 (executable)
@@ -74,29 +74,29 @@ class MembershipTool( BaseTool ):
        security.declareProtected(ListPortalMembers, 'getMemberById')
        
        
        security.declareProtected(ListPortalMembers, 'getMemberById')
        
        
-       memberareaPortalType = 'Folder'
+       memberareaPortalType = 'Huge Plinn Folder'
        
 
        
 
-       security.declareProtected(SetOwnPassword, 'setPassword')
-       def setPassword(self, password, domains=None):
-               '''Allows the authenticated member to set his/her own password.
-               '''
-               user_folder = self.__getPUS()
-               if user_folder.meta_type == 'Group User Folder' :
-                       registration = getToolByName(self, 'portal_registration', None)
-                       if not self.isAnonymousUser():
-                               member = self.getAuthenticatedMember()
-                               if registration:
-                                       failMessage = registration.testPasswordValidity(password)
-                                       if failMessage is not None:
-                                               raise 'Bad Request', failMessage
-                               member.setSecurityProfile(password=password, domains=domains)
-                               member.changePassword(password)
-                       else:
-                               raise 'Bad Request', 'Not logged in.'
-                       
-               else :
-                       BaseTool.setPassword(self, password, domains=None)
+#      security.declareProtected(SetOwnPassword, 'setPassword')
+#      def setPassword(self, password, domains=None):
+#              '''Allows the authenticated member to set his/her own password.
+#              '''
+#              user_folder = self.__getPUS()
+#              if user_folder.meta_type == 'Group User Folder' :
+#                      registration = getToolByName(self, 'portal_registration', None)
+#                      if not self.isAnonymousUser():
+#                              member = self.getAuthenticatedMember()
+#                              if registration:
+#                                      failMessage = registration.testPasswordValidity(password)
+#                                      if failMessage is not None:
+#                                              raise 'Bad Request', failMessage
+#                              member.setSecurityProfile(password=password, domains=domains)
+#                              member.changePassword(password)
+#                      else:
+#                              raise 'Bad Request', 'Not logged in.'
+#                      
+#              else :
+#                      BaseTool.setPassword(self, password, domains=None)
 
 
 
 
 
 
@@ -241,10 +241,7 @@ class MembershipTool( BaseTool ):
                        member = self.getMemberById(userid)
                        if not member :
                                return userid
                        member = self.getMemberById(userid)
                        if not member :
                                return userid
-                       memberName = getattr(member, 'name', '')
-                       memberGivenName = getattr(member, 'given_name', '')
-                       memberId = member.getId()
-                       memberFullName = formatFullName(memberName, memberGivenName, memberId, nameBefore = nameBefore)
+                       memberFullName = member.getMemberFullName(nameBefore=nameBefore)
                        
                return memberFullName
        
                        
                return memberFullName