I have a specific user role with a profile attached too them. Every user with this role has a corresponding node with the same information that can be found on the user's profile. Now I'm looking for a way to keep the two in sync, so if you change the user's profile, it would update the corresponding node as well. Is there a way to hook in to Profile2's form submit handler, or something similar?
1 Answer
Can't you just add your own submit handler to the form you're talking about rather than trying to override an existing one?
-
I tried using hook_form_profile2_form_alter to add another submit handler:
$form['#submit'][] = 'accounts_profile_form_submit';
Though that didn't seem to work.– ZediciusCommented Jun 25, 2012 at 10:57 -
Ack, nevermind. Since I'm working different user roles, I wasn't logged in as admin, so devel wasn't showing up. Stupid.– ZediciusCommented Jun 25, 2012 at 11:03
-
Ah, you know devel has permissions to let all users see it? Commented Jun 25, 2012 at 11:04
-
Yep. Though I had entirely forgotten to change them. Thanks though!– ZediciusCommented Jun 25, 2012 at 11:05