Passing a Member ID within a ‘Return’ Parameter
Posted: 26 January 2010 08:07 AM   [ Ignore ]
Newbie
Rank
Total Posts:  7
Joined  2009-04-21

I’ve completed an ‘Edit Profile’ form and am setting up the ‘return’ parameter to a template I have specified.

Once the edit form is submitted, I would like the user to be sent back to the same form, with a ‘Profile Updated’ message at the top, I figure it’s more user friendly that way, just in case they want to change anything else etc.

My problem is how to pass the Member ID of the User Profile that has just been updated through to the URL so the correct Profile displays with the message.

Currently the return with {member_id} simply passes on my own ID, not the ID of the Profile I’ve just edited.

Is there a way to pass on the Profile ID rather than my own?

Profile
 
 
Posted: 27 January 2010 05:16 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRank
Total Posts:  335
Joined  2009-10-27

Good morning!

Thank you for contacting us. Someone will get back to you soon. smile

 Signature 
Profile
 
 
Posted: 27 January 2010 11:37 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Hi Jon,

User should allow you to do this… just a matter of what’s in your template code. Are you able to post it for me to have a look at? smile

 Signature 
Profile
 
 
Posted: 28 January 2010 01:52 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  7
Joined  2009-04-21

Hi Kelsey, thanks for the reply.

I’ve currently got {exp:user:edit allowed_groups=“3|5|6|7|8” return=”{path=admin/admin_profile_updated}”} in my template, I added {member_id} to the end of the template, but (obviously I realised afterwards) it only passes on the logged in users ID and not the ID of the user I’m editing.

Profile
 
 
Posted: 28 January 2010 04:11 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Yes, that would make sense because that {member_id} variable would not yet be parsed by the User:Edit loop. I would imagine you’d already have the Member ID in the URI, so you can take it from there with {segment_3} or whatever smile

 Signature 
Profile