[buddypress-trac] [BuddyPress] #3672: Changed email address on user settings is not reflected on next pageload
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon Oct 10 19:04:40 UTC 2011
#3672: Changed email address on user settings is not reflected on next pageload
--------------------------+-----------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 1.6
Component: Settings | Version: 1.5
Severity: minor | Keywords:
--------------------------+-----------------
When you change email address via the Settings subsection of the profile,
the new address is properly saved, but the *old* address displays on the
first subsequent page load. (In other words, if you navigate away from the
Settings page, and then return, you will see the new address.)
I assume that what's happening has to do with WP or BP caching, and the
fact that we are not redirecting after the settings are saved. Thus, when
you submit a change, your POST goes to /members/boone/settings/general/;
bp_core_screen_general_settings() catches and sees that you have submitted
a change; it saves the change and immediately loads the template. WP loads
your usermeta early in this process (actually, early in the setup_globals
process, I think), and that data is not reset before the template is
loaded, despite the fact that it's been modified in the database.
Two options:
1) Bust the cache on save, probably by reaching directly into
$bp->displayed_user
2) Redirect after the save, so the issue doesn't arise in the first place.
The second option is more complicated. Ideally, it would involve breaking
the settings save out of the screen function and putting it into its own
action function. But it seems more in keeping with what we do elsewhere in
BP, and it has the side benefit of not resubmitting on browser refreshes.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3672>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list