<p>You will need to add a <a href="http://buildwithcraft.com/docs/routing">custom route</a> for the path for which you want to show the profile from a list of all users.</p>

<p>Per my example of <code>/profile/{{ username }}</code>:</p>

<p>In your <code>profile/index</code> template, you would run a loop on the user set of your choice:</p>

<pre><code>{% set users = craft.users %}
{% for user in users %}
    &lt;a href="/profile/{{ user }}"&gt;{{ user }}&lt;/a&gt;
{% endfor %}
</code></pre>

<ol>
<li>Craft Admin › Settings › <strong>Routes</strong></li>
<li><strong>New Route</strong></li>
<li>If the URI looks like this: <code>profile/*</code> (Use the <code>*</code> token provided)</li>
<li>Load this template: <code>profile/_profile</code></li>
</ol>

<p>Then, in your <code>profile/_profile</code> template, </p>

<pre><code>{% set user = craft.users.username( craft.request.segment(2) ).first() %}
</code></pre>

<p>Once <code>user</code> is defined, you can use the <a href="http://straightupcraft.com/articles/cheat-sheet-craft.users">UserModel</a> to return any data from that user (i.e. <code>{{ user.email }}</code> ).</p>

CC BY-SA 3.0
2014-07-22T16:30:15.213Z
2014-07-22T16:30:15.213Z
Ryan Shrum
<p>If you simply need a public profile page, you can build that easy enough.  Simply pass in some user identifier through the URI <code>/profile/username</code> or <code>/profile/userId</code> will do.</p>

<p>Then from your template:</p>

<pre><code>{% set userId = craft.request.getSegment(2) %}
{% set user = craft.users.id(userId).first() %}
</code></pre>

<p>Now <code>user</code> is a <a href="http://buildwithcraft.com/docs/templating/usermodel" rel="nofollow">UserModel</a> and you can access any of those properties of it as well as any custom fields you've assigned to users.</p>

<p>Additionally, you can create templates on the front-end for user management.</p>

<p>This includes <a href="http://buildwithcraft.com/docs/templating/user-registration-form" rel="nofollow">public registration</a>, <a href="http://buildwithcraft.com/docs/templating/user-profile-form" rel="nofollow">editing user profiles</a>, <a href="http://buildwithcraft.com/docs/templating/forgot-password-form" rel="nofollow">password</a> <a href="http://buildwithcraft.com/docs/templating/set-password-form" rel="nofollow">reseting</a> and <a href="http://buildwithcraft.com/docs/templating/login-form" rel="nofollow">logging in</a>.</p>

CC BY-SA 3.0
2014-07-22T15:36:40.047Z
i don't need front-end user management, just want to be able to have a public profile page for each user in the system.
carbonjoetunis
CC BY-SA 3.0
2014-07-23T04:57:16.433Z
@user412 Brad did show you how to do the basis of that very easily. You just need to write your template to access the user profile fields you want from 'user'. The rest is optional, if quite helpful to see how to do it ...from one of the founders of Craft.
narration_sd
CC BY-SA 3.0
2014-07-22T04:05:06.113Z
2015-07-20T20:01:22.897Z
2015-07-20T20:01:22.897Z
Brad Bell
<p>I'd like to manage my users (both active site users, and other employees at my client's company) via the Craft user management. I've added more profile fields, etc. But i'm wondering, is there a built in public profile page/route for users?  I'm listing various users on a page, and i'd like their profile image to link to a profile page for each of them, with more info, contact info etc. What's the best way to do this?  </p>

CC BY-SA 3.0
2014-07-21T22:27:32.453Z
To my knowledge, there is no built in user routing. What exactly are you trying to achieve? Are you wanting to display a profile of a staff member or user at the url (i.e. `/profile/{{ username }}` )?
Ryan Shrum
CC BY-SA 3.0
2014-07-22T15:29:09.313Z
Yes, I'm trying to display profile pages for users in the system.
carbonjoetunis
<users>
User profile public page
# User profile public page

(Asked by: username_0 on 2014-07-21)

I'd like to manage my users (both active site users, and other employees at my client's company) via the Craft user management. I've added more profile fields, etc. But i'm wondering, is there a built in public profile page/route for users? I'm listing various users on a page, and i'd like their profile image to link to a profile page for each of them, with more info, contact info etc. What's the best way to do this?

**Tags:** users

> **Comments:**
> **username_1**: To my knowledge, there is no built in user routing. What exactly are you trying to achieve? Are you wanting to display a profile of a staff member or user at the url (i.e. `/profile/{{ username }}` )?  
> **username_0**: Yes, I'm trying to display profile pages for users in the system.  

---

## 2 answers

### Answer by username_1 on 2014-07-22. Score: 16

You will need to add a custom route for the path for which you want to show the profile from a list of all users.
Per my example of /profile/{{ username }}:
In your profile/index template, you would run a loop on the user set of your choice:
{% set users = craft.users %}
{% for user in users %}
    {{ user }}
{% endfor %}


Craft Admin › Settings › Routes
New Route
If the URI looks like this: profile/* (Use the * token provided)
Load this template: profile/_profile

Then, in your profile/_profile template, 
{% set user = craft.users.username( craft.request.segment(2) ).first() %}

Once user is defined, you can use the UserModel to return any data from that user (i.e. {{ user.email }} ).


---

### Answer by username_2 on 2014-07-22. Score: 7

If you simply need a public profile page, you can build that easy enough.  Simply pass in some user identifier through the URI /profile/username or /profile/userId will do.
Then from your template:
{% set userId = craft.request.getSegment(2) %}
{% set user = craft.users.id(userId).first() %}

Now user is a UserModel and you can access any of those properties of it as well as any custom fields you've assigned to users.
Additionally, you can create templates on the front-end for user management.
This includes public registration, editing user profiles, password reseting and logging in.

> **Comments:**
> **username_0**: i don't need front-end user management, just want to be able to have a public profile page for each user in the system.  
> **username_3**: @user412 Brad did show you how to do the basis of that very easily. You just need to write your template to access the user profile fields you want from 'user'. The rest is optional, if quite helpful to see how to do it ...from one of the founders of Craft.  

---

