<p>This works:</p>

<pre><code>{% set user = craft.users.id(craft.request.lastSegment).status('pending').first() %}
</code></pre>

CC BY-SA 3.0
2015-06-01T19:52:34.133Z
2015-06-01T19:52:34.133Z
Roger Glenn
<p>I have public user registration enabled with the "Verify email addresses" setting checked.</p>

<p>User registration form includes these "action" and "redirect" hidden fields:</p>

<pre><code>&lt;input type="hidden" name="action" value="users/saveUser"&gt;
&lt;input type="hidden" name="redirect" value="signup/payment/{id}"&gt;
</code></pre>

<p>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:</p>

<pre><code>{% set userId = craft.request.lastSegment() %}
{% set profile = craft.users.id(userId) | first %}
</code></pre>

<p>But if I hardcode an existing Active user's ID it works:</p>

<pre><code>{% set profile = craft.users.id(30) | first %}
</code></pre>

<p>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.</p>

CC BY-SA 3.0
2014-12-14T00:40:17.073Z
What template error is being throw? What does this output? `{{ craft().request.lastSegment() }} `
Brad Bell
CC BY-SA 3.0
2015-05-15T16:14:20.493Z
Very late update, but this works...

`{% set user = craft.users.id(craft.request.lastSegment).status('pending').first() %}`
Roger Glenn
CC BY-SA 3.0
2015-05-15T16:24:34.300Z
Would you mind adding that as an official answer, Roger?
Brad Bell
<users><registration><status>
Can't access Pending user's profile info
# Can't access Pending user's profile info

(Asked by: username_0 on 2014-12-12)

I have public user registration enabled with the "Verify email addresses" setting checked.
User registration form includes these "action" and "redirect" hidden fields:



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.

**Tags:** users, registration, status
> **Comments:**
> **username_1**: What template error is being throw? What does this output? `{{ craft().request.lastSegment() }} `  
> **username_0**: Very late update, but this works...  `{% set user = craft.users.id(craft.request.lastSegment).status('pending').first() %}`  
> **username_1**: Would you mind adding that as an official answer, Roger?  

---

## 1 answers

### Answer by username_0 on 2015-06-01. Score: 2

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


---

