Deleted users still in database

This topic contains 9 replies, has 3 voices, and was last updated by  joecam 6 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #1686

    joecam
    Buyer
    Post count: 63

    Hi,

    Just testing the UWP with Social Login, and found a complex issue, but i would like to break it down to subgroups, so it will be easier to follow (and post different issue into other topic).
    It is a MULTISITE INSTALL, and I can not reproduce it on a single install…!!!!
    If i delete user(s) from the admin area of a subsite -USERS/ALL USERS -> select multiple and mass delete or simple delete one – the user(s) deleted from the main PREFX_users table, but not deleted from the PREFX_SITENUMBER_uwp_usermeta table, and already deleted users are still there.
    On a single site install it is removed as expected, and works well.
    Do you have a solution for this issue?
    Thanks,

    #1690

    Alex Rollin
    Moderator
    Post count: 27815

    Hello!

    Have you already checked this:

    https://userswp.io/docs/multisite-installation/

    If that doesn’t fix it, would you mind if we took a look at your site?

    WordPress Credentials
    WP Admin Login URL:
    WP Admin Username:
    WP Admin Password:

    FTP Credentials
    FTP Host:
    FTP Port:
    FTP User:
    FTP Password:

    #1692

    joecam
    Buyer
    Post count: 63
    This reply has been marked as private.
    #1702

    Patrik
    Moderator
    Post count: 1971

    Hi Joe,

    Can you please let us know the steps you are following to delete the user so that we can regenerate the issue from our side?

    Regards,
    Patrik

    #1706

    joecam
    Buyer
    Post count: 63
    This reply has been marked as private.
    #1707

    Patrik
    Moderator
    Post count: 1971

    Hi Joe,

    Actually, this issue happens when the usersWP is not network active for multisite. We already have a function to remove user data from the uwp_usermeta table but it will be called only when our plugin is active network-wide else our plugin and its files will be not loaded and so that the function will be not called while you delete the user from the main site of the multisite network. The user data deleted when there is no multisite as our plugin will be active and so the files and the function to delete the user meta will be called.

    So if the userWP is network active it will delete the user meta on user delete. Let me know if you need more information.

    Regards,
    Patrik

    #1715

    joecam
    Buyer
    Post count: 63

    Hi Patrik,

    Thank you for your information. I followed your installation manual (https://userswp.io/docs/multisite-installation/), and the best configuration has been chosen for my specific needs, so it is why i using the activation on per site basis.
    I need the user functions on all sub-site, as each of them should work as independent service.

    I understood the origin of the issue from your explanation, and i might have a solution to switch the plugin activation into Network Wide Active, but i feel the present behavior is not the ideal one. Let we say a user registering on one sub-site only, and for any reason the user will be deleted -on that given site in the admin area-, i feel this record should be removed completely from that user table (_uwp_usermeta), and of course from the main site user table as well, as no more site associated to that user.
    My question is, will you change this behavior in the future, or will you keep the logic behind it as it is now? How do you feel, is it a bug or you want to work this way…???
    Anyway, i will try the network activation (Network Wide Active – Pages on all sites) and will let you know if it works as expected.
    Thank you,

    #1716

    joecam
    Buyer
    Post count: 63

    Hi Patrik,

    Tested the network activation (Network Wide Active – Pages on all sites) on my localhost. The _uwp_usermeta table has been created without site number (main site), and I did the same registration-delete procedure. After the user delete on the sub-site the user is still in the main site’s user manager, and still in both of _uwp_usermeta and the _users table.
    Deleted the user from the main site’s user manager, and disappeared from all user lists, in the main site as well. But the user still in the database in the _uwp_usermeta table, and of course the same email can not be used again for registration, and as there is no valid user, it is impossible to reactivate it again from user side.

    I feel this is very similar to the previous problem, the user not deleted…

    Anyway, i would like to go with my first selected activation mode – independent user manager and tables for all sub-sites – as easier to keep data separated between sites, at least in my case.

    Will you consider this as a bug and will you fix it, or can you offer some update-proof tweek for it, with the independent user table/activated on per site base?
    The other two activation method is not fit to my needs.

    Thank you

    #1719

    Patrik
    Moderator
    Post count: 1971

    Hi Joe,

    We have already added this issue on GIT and we are working on this and will be fixed in next version.

    Just for your information, by default in WordPress, when the user is created on subsite it will be also created on the main site. If you see the options in users listing, There is “remove” link for each user and not “delete” link. That means WordPress by default removes a user from the subsite and not delete from the main site. When you see the users options in the main site, there is delete option which will delete the user from the database.

    We will apply logic like when the user is deleted from the subsite we will see if the user belongs to other sites or not. If the user belongs to other subsites then we will keep his records in database else we will remove his records from the database.

    We will keep the current flow for single site setup.

    Let me know if you have any inputs here.

    Regards,
    Patrik

    #1720

    joecam
    Buyer
    Post count: 63

    Hi Patrik,

    Thank you for your info on it and the detailed explanation of WP user management.

    I really like the proposed logic from your side, that is what i need and nothing else i am looking for. Looking forward to hear about the next release.

    Thank you,
    Joe

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket