• Hello, I am using WP-Members plugin and found it extremely relevant to my site. However, for 1 particular requirement, I am in need of help.

    I want to add new Checkbox field to the registration and Edit profile forms.
    If the user changes the selection for that field, I need to initiate email confirmation to users, if the user edits his / her profile.

    Can someone please help how i may do that?

    Thank you very much in advance!

    https://www.ads-software.com/plugins/wp-members/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mayankgpta

    (@mayankgpta)

    Hi Chad, Is it even possible in WP-Members or my expectations are not reasonable?

    Plugin Author Chad Butler

    (@cbutlerjr)

    Yes, it is possible. You’d have to write a couple of custom functions to handle it.

    Basically, when a user updates their profile, there are two action hooks in the process that you can use:

    wpmem_pre_update_data
    wpmem_post_update_data

    The “pre” action hook comes before the user’s data is updated, and “post” comes after.

    So you need two functions. The first you could hook to the “pre” action and put the user’s current data into a number of variables or an array and globalize it. In the second hooked to the “post” hook, you can access the global variable or array and compare it with what is in the form fields after updating. If anything changed, trigger an email to the admin.

    There is actually a set of code snippets available on the premium support site rocketgeek.com that does this: https://rkt.bz/qI

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need help to activate mail confirmations when Edit Profile’ is closed to new replies.