Skip to:

Hooking into settings update

  • Hi,

    I want to hook into to password save action which is submitted from user settings page. I havent made a test yet but it seems bp_settings_action_general function(bp-settins->bp-settings-action.php) is responsible for this.

    There is only 1 action (bp_core_general_settings_after_save) defined in the function and it’s runing right after the bp_core_add_message function.

    It looks like if i use bp_core_general_settings_after_save hook and made a custom verification because of the previous bp_core_add_message usage, a “failure” message may display even my custom verification returns true.

    I’m not sure is there a function to remove already stored message but it may work for me. I can remove core message before runing custom validations and then add mines.


Viewing 1 replies (of 1 total)
  • It doesn’t look like there’s a function to clear those messages, but if you empty the global directly (bp->template_message and $bp->template_message_type), you’ll see that bp_core_add_message sets a cookie, so you’ll probably need to clear those cookies, too.

    It sounds like this should work.

Viewing 1 replies (of 1 total)
  • The topic ‘Hooking into settings update’ is closed to new replies.
Skip to toolbar