How to get the value and set "Notify me when I get mentioned"?
Quote from FTP on October 23, 2019, 3:15 pmHi @asgaros,
I have Asgaros installed as well as Ultimate Member on a private website.
Problem: if we look at email notifications, users have to find the settings for:
- New blog Posts & Comments in their Ultimate Member profile (via custom fields)
- New Topics & Messages in the Subscriptions page of Asgaros
- New Mentions in their WordPress profile
So I would like to simplify their life a bit by allowing them to manage the Asgaros Mention notifications settings in the Ultimate Member profile as well, so they would have only 2 pages to visit to review all their notifications settings and no need to go to the WordPress profile.
For that, I can add a new custom checkbox in the users’ Ultimate Member profile.
Then I can align this field value with the Asgaros setting in the WordPress profile when the UM profile form is opened (via a function).
And at last, I can also modify the Asgaros setting in the WordPress profile when the UM profile form is saved (in case this setting is changed).Now my need:
- What would be the line/code in a function in functions.php to get the mention notification setting in a user’s WP profile?
- And what would be the line in a function in functions.php to assign TRUE or FALSE to the mention notification setting in a user’s WP profile?
Thanks! π
P.S.: apart from my personal need, maybe you could consider moving this setting to the Asgaros subscription form?
This setting for New Mentions is alone and a bit isolated in the WP profile. It would also be easier for your users to group all those email notification settings in 1 page, IMO, and the Subscriptions page is the good candidate to centralise all this type of settings.
Hi @asgaros,
I have Asgaros installed as well as Ultimate Member on a private website.
Problem: if we look at email notifications, users have to find the settings for:
- New blog Posts & Comments in their Ultimate Member profile (via custom fields)
- New Topics & Messages in the Subscriptions page of Asgaros
- New Mentions in their WordPress profile
So I would like to simplify their life a bit by allowing them to manage the Asgaros Mention notifications settings in the Ultimate Member profile as well, so they would have only 2 pages to visit to review all their notifications settings and no need to go to the WordPress profile.
For that, I can add a new custom checkbox in the users’ Ultimate Member profile.
Then I can align this field value with the Asgaros setting in the WordPress profile when the UM profile form is opened (via a function).
And at last, I can also modify the Asgaros setting in the WordPress profile when the UM profile form is saved (in case this setting is changed).
Now my need:
- What would be the line/code in a function in functions.php to get the mention notification setting in a user’s WP profile?
- And what would be the line in a function in functions.php to assign TRUE or FALSE to the mention notification setting in a user’s WP profile?
Thanks! π
P.S.: apart from my personal need, maybe you could consider moving this setting to the Asgaros subscription form?
This setting for New Mentions is alone and a bit isolated in the WP profile. It would also be easier for your users to group all those email notification settings in 1 page, IMO, and the Subscriptions page is the good candidate to centralise all this type of settings.
Quote from FTP on October 24, 2019, 10:55 pmQuote from FTP on October 23, 2019, 3:15 pm
- What would be the line/code in a function in functions.php to get the mention notification setting in a user’s WP profile?
- And what would be the line in a function in functions.php to assign TRUE or FALSE to the mention notification setting in a user’s WP profile?
Found!
get_user_meta($user_id, ‘asgarosforum_mention_notify’, true);
update_user_meta($user_id, ‘asgarosforum_mention_notify’, ‘yes’);
OR update_user_meta($user_id, ‘asgarosforum_mention_notify’, ‘no’);
Only remains my suggestion… π
Quote from FTP on October 23, 2019, 3:15 pm
P.S.: apart from my personal need, maybe you could consider moving this setting to the Asgaros subscription form?
This setting for New Mentions is alone and a bit isolated in the WP profile. It would also be easier for your users to group all those email notification settings in 1 page, IMO, and the Subscriptions page is the good candidate to centralise all this type of settings.
Quote from FTP on October 23, 2019, 3:15 pm
- What would be the line/code in a function in functions.php to get the mention notification setting in a user’s WP profile?
- And what would be the line in a function in functions.php to assign TRUE or FALSE to the mention notification setting in a user’s WP profile?
Found!
get_user_meta($user_id, ‘asgarosforum_mention_notify’, true);
update_user_meta($user_id, ‘asgarosforum_mention_notify’, ‘yes’);
OR update_user_meta($user_id, ‘asgarosforum_mention_notify’, ‘no’);
Only remains my suggestion… π
Quote from FTP on October 23, 2019, 3:15 pm
P.S.: apart from my personal need, maybe you could consider moving this setting to the Asgaros subscription form?
This setting for New Mentions is alone and a bit isolated in the WP profile. It would also be easier for your users to group all those email notification settings in 1 page, IMO, and the Subscriptions page is the good candidate to centralise all this type of settings.
Quote from Asgaros on October 25, 2019, 10:02 pmHi @ftp
apart from my personal need, maybe you could consider moving this setting to the Asgaros subscription form?
This setting for New Mentions is alone and a bit isolated in the WP profile. It would also be easier for your users to group all those email notification settings in 1 page, IMO, and the Subscriptions page is the good candidate to centralise all this type of settings.I plan to move login/registration/profile directly into the forum in a future update. However, no idea yet onΒ when it will become available.
Hi @ftp
apart from my personal need, maybe you could consider moving this setting to the Asgaros subscription form?
This setting for New Mentions is alone and a bit isolated in the WP profile. It would also be easier for your users to group all those email notification settings in 1 page, IMO, and the Subscriptions page is the good candidate to centralise all this type of settings.
I plan to move login/registration/profile directly into the forum in a future update. However, no idea yet onΒ when it will become available.