Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv14094/CMFCore

Modified Files:
      Tag: CMF-1_5-branch
        MemberDataTool.py 
Log Message:
MemberDataTool: setSecurityProfile (called by MembershipTool's
setPassword) now uses the userFolderEditUser() API of the user folder to
change user information.


=== Products/CMFCore/MemberDataTool.py 1.36 => 1.36.2.1 ===
--- Products/CMFCore/MemberDataTool.py:1.36     Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/MemberDataTool.py  Fri Apr 15 13:25:20 2005
@@ -366,14 +366,16 @@
     def setSecurityProfile(self, password=None, roles=None, domains=None):
         """Set the user's basic security profile"""
         u = self.getUser()
-        # This is really hackish.  The Zope User API needs methods
-        # for performing these functions.
-        if password is not None:
-            u.__ = password
-        if roles is not None:
-            u.roles = roles
-        if domains is not None:
-            u.domains = domains
+
+        # The Zope User API is stupid, it should check for None.
+        if roles is None:
+            roles = list(u.getRoles())
+            if 'Authenticated' in roles:
+                roles.remove('Authenticated')
+        if domains is None:
+            domains = u.getDomains()
+
+        u.userFolderEditUser(u.getUserName(), password, roles, domains)
 
     def __str__(self):
         return self.getMemberId()

_______________________________________________
CMF-checkins mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/cmf-checkins

Reply via email to