public static function OnUserDelete($ID) { global $DB; if (!CSocNetGroup::__ValidateID($ID)) { return false; } $ID = IntVal($ID); $bSuccess = True; if (!CSocNetGroup::DeleteNoDemand($ID)) { if ($ex = $GLOBALS["APPLICATION"]->GetException()) { $err = $ex->GetString(); } $GLOBALS["APPLICATION"]->ThrowException($err); $bSuccess = false; } if ($bSuccess) { CSocNetUserRelations::DeleteNoDemand($ID); CSocNetUserPerms::DeleteNoDemand($ID); CSocNetUserEvents::DeleteNoDemand($ID); CSocNetMessages::DeleteNoDemand($ID); CSocNetUserToGroup::DeleteNoDemand($ID); CSocNetLogEvents::DeleteNoDemand($ID); CSocNetLog::DeleteNoDemand($ID); CSocNetLogComments::DeleteNoDemand($ID); CSocNetFeatures::DeleteNoDemand($ID); CSocNetSubscription::DeleteEx($ID); CUserOptions::DeleteOption("socialnetwork", "~menu_" . SONET_ENTITY_USER . "_" . $ID, false, 0); } return $bSuccess; }