0

I tried to use return="site/profile/{member_id}" in my member:login form, but that did not work, giving 0 to segment 3.

I also did try {logged_in_member_id} with no success.

Is there a way to return with valid member_id in segment 3, so that I could pull out content only for the logged in member to be shown?

Thanks in advance.

  • That's going to be tough, since {member_id} isn't available until after log in. Why not just check {logged_in_member_id} within the "site/profile" page template and proceed accordingly? – Steve Mock Feb 27 '15 at 14:38
  • Destination URL ("site/profile") in form return then gets redirected automatically to site/profile/{logged_in_member_id}? That way the variable will be set once they have submitted the form and the redirect will work. But ensure that no-one else can just enter that URL to access other people's information...! – Peter Lewis Feb 27 '15 at 16:10
  • Yep. I did came to a conclusion that I just put "profile" link to top bar with the tag on 3rd segment, and some conditionals against it to check out group id. By that I get 2 different setups with all the things I need instead of using one Long Template with "if's" in it. – Riverboy Feb 27 '15 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.