]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #1196: ElggEntity::disable() now accepts a 2nd arg for recursive. New users...
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 28 Aug 2009 20:06:42 +0000 (20:06 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 28 Aug 2009 20:06:42 +0000 (20:06 +0000)
git-svn-id: https://code.elgg.org/elgg/trunk@3450 36083f99-b078-4883-b0ff-0f9b5a30f544

actions/register.php
engine/lib/entities.php

index 27d9ca23f83023487033c123b98e22655e7929c2..75721822cf212775b94b6056dbe5edc75ed1213e 100644 (file)
@@ -55,7 +55,9 @@
                                                request_user_validation($guid);
                                        
                                        if (!$new_user->admin)
-                                               $new_user->disable('new_user'); // Now disable if not an admin
+                                               $new_user->disable('new_user', false);  // Now disable if not an admin\r
+                                               // Don't do a recursive disable.  Any entities owned by the user at this point\r
+                                               // are products of plugins that
                                        \r
                                        system_message(sprintf(elgg_echo("registerok"),$CONFIG->sitename));
                                        
index 19d9051e3c4b2560ca2a6aedf8e4d907bff07c89..b8c92ec429b888747c446f05a75b14950a0c14e6 100644 (file)
                 * Disable this entity.\r
                 * \r
                 * @param string $reason Optional reason\r
+                * @param bool $recursive Recursively disable all contained entities?\r
                 */\r
-               public function disable($reason = "")\r
+               public function disable($reason = "", $recursive = true)\r
                {\r
-                       return disable_entity($this->get('guid'), $reason);\r
+                       return disable_entity($this->get('guid'), $reason, $recursive);\r
                }\r
                \r
                /**\r