• Resolved carlospck

    (@carlospck)


    Hello, I would like to know if there is any code or shortcode that I can add to a tab in the user profile menu that shows the profiles (roles) that the user has gone through and the date the change was made for each one. It is to show as a “historical”

    Example:
    um_author – 12/31/2022
    um_contributor – 10/21/2023
    etc..

    Thanks in advance.

Viewing 15 replies - 1 through 15 (of 38 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @carlospck

    Unfortunately, this functionality does not exist in our plugin at this time.

    Regards.

    missveronica

    (@missveronicatv)

    @carlospck

    You can try this plugin “UM User Role History”

    https://github.com/MissVeronica/um-user-role-history

    Thread Starter carlospck

    (@carlospck)

    Hello @missveronicatv,

    Thank you very much for your attention and your work. It is appreciated that there are people who offer solutions in a selfless way. The plugin works correctly, although I need all the roles that the user has gone through to appear. Right now the registration date, the last connection, and the current role appear. Forgive my ignorance because perhaps what I am asking is not possible to do. I would need to see, if the user has gone through 7 role changes (for example), those roles they have gone through and the date on which they were changed appear. assigned each one. I don’t know if this is recorded in some way so that it can be shown. Thank you again for your attention and your work.

    Thread Starter carlospck

    (@carlospck)

    Hello again @missveronicatv,

    sorry for the confusion. I just checked that when I change the role through the “WordPress” panel it does appear in the history. My problem is that these role changes are not made from there (wordpress users tab), I make the changes through forms (Gravity Forms and Ultimate Member).

    missveronica

    (@missveronicatv)

    @carlospck

    There are no saved Role changes in UM.

    The Plugin is building a History for each User when Role changes are done and saved with an array of all changes incl the time in the users meta_key user_role_history.

    The Plugin is using a WP hook set_user_role for collecting the changes.

    https://developer.www.ads-software.com/reference/hooks/set_user_role/

    Thread Starter carlospck

    (@carlospck)

    @missveronicatv

    Sorry for my ignorance regarding PHP code. I understand from what you tell me that I have no way of being able to show the history of role changes that have not been generated from the WordPress users section, because the role changes generated in UM or GF are not recorded. TRUE?

    missveronica

    (@missveronicatv)

    @carlospck

    I have made an update of the plugin, which should get Role changes from UM and GF.

    Thread Starter carlospck

    (@carlospck)

    @missveronicatv

    Thank you very much, really.

    Now take the changes made from GF and UM.
    The only thing is that now all the states appear except the current one. The last one that appears is the one before the current one.

    Some blank spaces also appear in between (but it is not a problem).

    missveronica

    (@missveronicatv)

    @carlospck

    Version 1.2 is available now with some code improvements.

    Thread Starter carlospck

    (@carlospck)

    @missveronicatv

    The blank spaces no longer appear, but the last role still does not appear with the current one. The last one that appears is the previous one, not the current one. Every time I change roles, the last role I had before the current one appears in the history. I have tried with other users in case it was a mistake made by that user but it happens with everyone.

    The history:

    WordPress users panel:

    missveronica

    (@missveronicatv)

    @carlospck

    Try to do a Clear User Cache in UM Dashboard.

    Thread Starter carlospck

    (@carlospck)

    @missveronicatv

    I have cleared the cache but the current status still does not appear. I’m sorry to bother you so much and I greatly appreciate your help.

    missveronica

    (@missveronicatv)

    @carlospck

    Version 1.3 is available with some code changes about current Role change.

    Thread Starter carlospck

    (@carlospck)

    @missveronicatv


    I feel terrible for the inconvenience I’m causing. Now with version 1.3 the tab appears broken.

    missveronica

    (@missveronicatv)

    @carlospck

    Test version 1.4 instead.

Viewing 15 replies - 1 through 15 (of 38 total)
  • The topic ‘Historical user profile changes’ is closed to new replies.