• Resolved lvelve

    (@lvelve)


    Hi,

    A user that is logged in, is created as subscriber in the wordpress database. In the wordpress database, For some users I add a role with the “Members – Membership & User Role Editor Plugin” to this user. But after a new login, this extra role is removed. I did some test and discovered that the user is recreated.

    Can I avoid a recreate at login if user already exists?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author tbenyon

    (@tbenyon)

    Hey @lvelve,

    In most cases the plugin, by default, assumes that you are using the external database as the centre of truth and after each login you we should update WordPress with any setting that may have changed in the external db. This includes:

    • name
    • password
    • email
    • roles
    • etc.

    There is a migration mode option that will only take this information on initial login. Then, if the user already exists you just login with their WordPress user and nothing gets updated again.

    Of course another solution is to put the roles that you require for the user into the external database and mage roles there.

    Does this meet your needs or do you need certain information to keep being updated and just roles to be referenced by WordPress? If this is the case, there is a hook that should help you achieve this, which I can write you some pseudocode for.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    I haven’t heard back so I’m assuming this is resolved.

    If you have any further questions please don’t hesitate to get back in contact.

    Kind regards,

    Tom ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘User is recreated at new login’ is closed to new replies.