OG notifications module, form alter of user_profile_form.

In the code it makes sure it's adding the checkbox to the right form based on whether there's a third argument in the URL.

While user_profile_form is generally at user/1/edit and there's a possible that the checkbox would be added to the wrong category. (The different tabs on user/1/edit/* are categories [I think it's somewhat explained on the api for hook_user $op category]).

A possible more secure way to check is via this category, IE:

if ($form['_category']['#value']=='account') { 
// code
}

(This was not producing any problems with me, but I noticed it when trying to track down an unrelated bug on a site and had just fixed a custom unrelated module that had forgotten this check, heh.)

Comments

Zen’s picture

Category: feature » task
Status: Active » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.