Notifications
Clear all

[Closed] Users, usergroups and synchronisation

26 Posts
5 Users
0 Reactions
1,044 Views
Posts: 44
(@gilbau)
Trusted Member
Joined: 4 years ago

Thanks for the topic. I solved my issue by putting only one group per user.

For the past two months, every Sunday or so, all my groups, especially a paid member group called "armember," would disappear. I had to manually rectify it regularly.

Another question I had was: How can I desynchronize groups between WordPress and wpForo?

Chris
Posts: 3650
(@chris)
Famed Member
Joined: 3 years ago

Hi @gilbau,

Navigate to Dashboard > wpForo > Settings > Login & Registration, and disable "Role-Usergroup Synchronization" option.

2 Replies
(@gilbau)
Joined: 4 years ago

Trusted Member
Posts: 44

@chris thanks but it is not possible to choose one by one 

And if i disable "Role-Usergroup Synchronization" option and enable again , I cant choose one by one also

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@gilbau,

Role-Usergroup Synchronization option disables the function, so you won't be able to synchronize any usergroup with user role.

Role-Usergroup Synchronization doesn't let to synchronize 1 usergroup with several user roles, only 1 usergroup with 1 user role.

Posts: 44
(@gilbau)
Trusted Member
Joined: 4 years ago

My issue is still there

I have a group named armember which have to be not synchronized whith nothing, but for example I  installed the new 2.18 wpforo this morning and this evening all my armember group was to 0 members instead of 281

So I have to make export daily of my wp_usermeta wp_user and wp_wpforo_profiles to backup the good datas

I think that wpforo synchronize some datas which have not to be synchronized

Perhaps As my armember group has no wpforo group in the synchronised function, every data is erased !

And the thing which is not clear and bad i that all the wpforo cron task is not visible

I join the code I use in a cron task to solve temporarly the issue

<?php
$servername = "servername";
$username = "username";
$password = "password";
$dbname = "dbname";




// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);

// Check connection
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}

function RunSQL($conn, $sql)
{
    if (!$conn) {
        die("Pas de connexion.");
    }
    if (mysqli_multi_query($conn, $sql)) {
        // Récupérer et vider les résultats des requêtes précédentes
        while (mysqli_more_results($conn) && mysqli_next_result($conn)) {
            if ($result = mysqli_store_result($conn)) {
                mysqli_free_result($result);
            }
        }
        echo "Record updated successfully";
    } else {
        echo "Erreur avec : \r\n$sql";
        echo "Error updating record: " . mysqli_error($conn);
    }
}




//Mettre en usermeta les 281 armember du 02 juin 2023
RunSQL($conn, "

REPLACE INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES(2383, 158, 'wp_capabilities', 'a:2:{s:22:\"armember_access_plan_2\";b:1;s:8:\"armember\";b:1;}');
REPLACE INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES(4258, 283, 'wp_capabilities', 'a:2:{s:22:\"armember_access_plan_2\";b:1;s:8:\"armember\";b:1;}');
REPLACE INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES(5068, 337, 'wp_capabilities', 'a:2:{s:22:\"armember_access_plan_2\";b:1;s:8:\"armember\";b:1;}');
");

//and more 278 members have to be added

mysqli_close($conn);

 

I join a pdf document with my good situation and the bad is when armember group is at 0 instead of 281

 

 

1 Reply
Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@gilbau,

Are you sure that wpForo is the problem maker?

wpForo makes changes on wpForo Usergroups based on WordPress User Roles and only if Role-Usergroup Synch is enabled, but wpForo doesn't have the availability to make changes on the WordPress User Roles based on wpForo Usergroups.

So please could you do more tests about this.

Posts: 44
(@gilbau)
Trusted Member
Joined: 4 years ago

this morning I just click on the "synchronize button" and 3 of my groups "assidus" "VIP" or "confirmés" become at 0 or 19 members in the wpforo section

Posts: 44
(@gilbau)
Trusted Member
Joined: 4 years ago

At the end I decided not to synchronise any more between wpforo and wordpress groups

Page 2 / 2