gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/common/include User.class,1.37,1.38


From: ruben
Subject: [Gforge-commits] gforge/common/include User.class,1.37,1.38
Date: Tue, 21 Dec 2004 09:59:28 -0600

Update of /cvsroot/gforge/gforge/common/include
In directory db.perdue.net:/tmp/cvs-serv30703/common/include

Modified Files:
        User.class 
Log Message:
added User->delete($sure) and changed the way useredit.php deletes users.

Index: User.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/include/User.class,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- User.class  12 Dec 2004 16:30:36 -0000      1.37
+++ User.class  21 Dec 2004 15:59:25 -0000      1.38
@@ -356,6 +356,29 @@
        }
 
        /**
+        *      delete() - remove the User from all his groups.
+        *
+        *      Remove the User from all his groups and set his status to D.
+        *
+        *  @param      boolean Confirmation of deletion.
+        *      @return true or false
+        */
+       function delete($sure) {
+               if (!$sure) {
+                       return false;
+               } else {
+                       $groups = &$this->getGroups();
+                       if (is_array($groups)) {
+                               foreach ($groups as $group) {
+                                       $group->removeUser($this->getID());
+                               }
+                       }
+                       $this->setStatus('D');
+               }
+               return true;
+       }
+
+       /**
         *      update() - update *common* properties of User object.
         *
         *      Use specific setter to change other properties.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]