Title: User role changes when exist
Last modified: March 2, 2020

---

# User role changes when exist

 *  Resolved [deqko](https://wordpress.org/support/users/deqko/)
 * (@deqko)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/user-role-changes-when-exist/)
 * Hello,
    I very like your plugin. I use it to connect two pages into one – front/
   site is on our CMS, and WP for shop. Wanna to have same accounts on both, but
   when user logged by your plugin – role was replaced by Subscriber. On external
   DB we don’t have roles like a WordPress (multi-roles and add new one).
 * **What I want?**
    If user exist in WP DB – can replace fistname and lastname 
   on WP DB (from external), but SAVE role as it is (don’t change unmapped field).
   It is possible?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/user-role-changes-when-exist/#post-12508813)
 * Hey [@deqko](https://wordpress.org/support/users/deqko/),
 * Apologies for not getting back to you sooner.
 * Been a busy week but trying to catch up with the support forum today 🙂
 * It is not currently possible. However I could add a hook in for you that would
   fire so you could customise the data that gets stored when updating the user.
 * This would mean that you could change the role to the current role.
 * Would this be of interest to you? If so I can add this feature to the backlog
   and I’ll give you a code snippet to make the specific change you require.
 * Thanks,
 * Tom
 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [6 years ago](https://wordpress.org/support/topic/user-role-changes-when-exist/#post-12771912)
 * Haven’t heard back from you for a while so I’m going to assume this is not required.
 * If not, don’t hesitate to get back in contact and we’ll see what we can do 🙂
 * Thanks,
 * Tom 🙂
 *  [KZKG^Gaara](https://wordpress.org/support/users/kzkggaara/)
 * (@kzkggaara)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/user-role-changes-when-exist/#post-12912951)
 * Hello,
    It happens to me too… in wp_usermeta my wp_capabilities changes always
   to subscriber 🙁
 * Some tip or help over here please?
 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/user-role-changes-when-exist/#post-12913659)
 * Hey [@kzkggaara](https://wordpress.org/support/users/kzkggaara/),
 * As I suggested to [@deqko](https://wordpress.org/support/users/deqko/), I could
   put a custom hook in that would allow you to customise what data is saved for
   the user so you can add your own logic.
 * If you get your login working from your other post and feel this would be useful
   I’ll start looking at adding the feature and writing you a bit of pseudocode 
   that would get you started and allow you to customise this further.
 * Let me know your thoughts 🙂
 * Thanks,
 * Tom

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘User role changes when exist’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/external-login_fbebd6.svg)
 * [External Login](https://wordpress.org/plugins/external-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/external-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/external-login/)
 * [Active Topics](https://wordpress.org/support/plugin/external-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/external-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/external-login/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/user-role-changes-when-exist/#post-12913659)
 * Status: resolved