Exemplo n.º 1
0
 function OnUserRelationsChange($user_id)
 {
     if (CModule::IncludeModule('search')) {
         CSearchUser::DeleteByUserID($user_id);
     }
     $provider = new CSocNetGroupAuthProvider();
     $provider->DeleteByUser($user_id);
     $provider = new CSocNetUserAuthProvider();
     $provider->DeleteByUser($user_id);
 }
Exemplo n.º 2
0
 function OnUserRelationsChange($user_id)
 {
     if (CModule::IncludeModule('search')) {
         CSearchUser::DeleteByUserID($user_id);
     }
     $provider = new CSocNetGroupAuthProvider();
     $provider->DeleteByUser($user_id);
     $provider = new CSocNetUserAuthProvider();
     $provider->DeleteByUser($user_id);
     $dbFriend = CSocNetUserRelations::GetRelatedUsers($user_id, SONET_RELATIONS_FRIEND);
     while ($arFriend = $dbFriend->Fetch()) {
         $friendID = $user_id == $arFriend["FIRST_USER_ID"] ? $arFriend["SECOND_USER_ID"] : $arFriend["FIRST_USER_ID"];
         $provider->DeleteByUser($friendID);
     }
 }