I have public user registration enabled with the "Verify email addresses" setting checked.

User registration form includes these "action" and "redirect" hidden fields:

<input type="hidden" name="action" value="users/saveUser">
<input type="hidden" name="redirect" value="signup/payment/{id}">

User's ID is coming through correctly in the last segment of the URL, but I can't fetch their profile. This is throwing a template error:

{% set userId = craft.request.lastSegment() %}
{% set profile = craft.users.id(userId) | first %}

But if I hardcode an existing Active user's ID it works:

{% set profile = craft.users.id(30) | first %}

Is there a way to access a Pending member's (albeit limited) profile info? What I really need to do is insert their email address into a subsequent form on the success page.

  • What template error is being throw? What does this output? {{ craft().request.lastSegment() }}
    – Brad Bell
    Commented Dec 14, 2014 at 0:40
  • Very late update, but this works... {% set user = craft.users.id(craft.request.lastSegment).status('pending').first() %} Commented May 15, 2015 at 16:14
  • Would you mind adding that as an official answer, Roger?
    – Brad Bell
    Commented May 15, 2015 at 16:24

1 Answer 1


This works:

{% set user = craft.users.id(craft.request.lastSegment).status('pending').first() %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.