diff options
-rw-r--r-- | actions/register.php | 4 | ||||
-rw-r--r-- | engine/lib/entities.php | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/actions/register.php b/actions/register.php index 27d9ca23f..75721822c 100644 --- a/actions/register.php +++ b/actions/register.php @@ -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
+ // Don't do a recursive disable. Any entities owned by the user at this point
+ // are products of plugins that system_message(sprintf(elgg_echo("registerok"),$CONFIG->sitename)); diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 19d9051e3..b8c92ec42 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -691,10 +691,11 @@ * Disable this entity.
*
* @param string $reason Optional reason
+ * @param bool $recursive Recursively disable all contained entities?
*/
- public function disable($reason = "")
+ public function disable($reason = "", $recursive = true)
{
- return disable_entity($this->get('guid'), $reason);
+ return disable_entity($this->get('guid'), $reason, $recursive);
}
/**
|