<p>Absolutely.</p>

<p>From the template side you'd do something like this to ensure they're editing their own page:</p>

<pre><code>{# assuming the URL structure for the profile page looks something like http://mydomain.com/users?id=5 %}

{% set editUserId = craft.request.getParam('id') %}

{% if editUserId and currentUser.id == editUserId %}
    You're in!
{$ else %}
    {% exit 403 %}
{% endif %}
</code></pre>

<p>Where <a href="http://buildwithcraft.com/docs/templating/global-variables#currentUser" rel="nofollow">currentUser</a> is a global variable that's a <a href="http://buildwithcraft.com/docs/templating/usermodel" rel="nofollow">UserModel</a> object.</p>

CC BY-SA 3.0
2015-08-23T08:28:29.447Z
Brad, Thanks so much for your response.

Regarding the URL - could it be configured to be something like mydomain.com/members/membername instead of passing a url option?
Adam Menczykowski
CC BY-SA 3.0
2015-08-23T16:20:14.180Z
Sure, but that's still passing it through the URL.  You're just using their username instead of their ID.
Brad Bell
CC BY-SA 3.0
2015-08-24T08:52:27.840Z
Finally, can I allow one user enter the CP and only edit their own profile there, or does it have to be administered by them on the front end?
Adam Menczykowski
CC BY-SA 3.0
2015-12-22T17:55:45.383Z
I can say, that coming to the end of this project, the user admin / front end templating has been nothing short of incredible. With such a helpful community both here on stackexchange and slack, I feel that I can achieve almost anything with craft!
Adam Menczykowski
CC BY-SA 3.0
2015-08-21T23:31:55.607Z
2015-08-21T23:31:55.607Z
Brad Bell
<p>I'm new to craft, in fact I haven't built a site with it yet, but am looking forward to getting my teeth into this interesting and seemingly very flexible CMS.</p>

<p>I am about to embark on a medium sized website build and have a question that is kind of a deal breaker for choosing the CMS. My question is:</p>

<p>Can I create users that have their own profile page, who can only edit their own page and do nothing else? This won't be a public registration, but administered internally, however they must be able to maintain a profile containing images, text and predetermined layouts that they can choose between.</p>

<p>Thanks guys!</p>

<hr>

<p>Brad, 
Thanks so much for your response.</p>

<p>Regarding the URL - could it be configured to be something like mydomain.com/members/membername instead of passing a url option?</p>

<users><user-profile><current-user>
User Profile page - one user can only access one page
# User Profile page - one user can only access one page

(Asked by: username_0 on 2015-08-21)

I'm new to craft, in fact I haven't built a site with it yet, but am looking forward to getting my teeth into this interesting and seemingly very flexible CMS.

I am about to embark on a medium sized website build and have a question that is kind of a deal breaker for choosing the CMS. My question is:

Can I create users that have their own profile page, who can only edit their own page and do nothing else? This won't be a public registration, but administered internally, however they must be able to maintain a profile containing images, text and predetermined layouts that they can choose between.

Thanks guys!

---

Brad,
Thanks so much for your response.

Regarding the URL - could it be configured to be something like mydomain.com/members/membername instead of passing a url option?

**Tags:** users, user-profile, current-user

---

## 1 answers

### Answer by username_1 on 2015-08-21. Score: 0 | Accepted answer

Absolutely.
From the template side you'd do something like this to ensure they're editing their own page:
{# assuming the URL structure for the profile page looks something like http://mydomain.com/users?id=5 %}

{% set editUserId = craft.request.getParam('id') %}

{% if editUserId and currentUser.id == editUserId %}
    You're in!
{$ else %}
    {% exit 403 %}
{% endif %}

Where currentUser is a global variable that's a UserModel object.

> **Comments:**
> **username_0**: Brad, Thanks so much for your response.  Regarding the URL - could it be configured to be something like mydomain.com/members/membername instead of passing a url option?  
> **username_1**: Sure, but that's still passing it through the URL.  You're just using their username instead of their ID.  
> **username_0**: Finally, can I allow one user enter the CP and only edit their own profile there, or does it have to be administered by them on the front end?  
> **username_0**: I can say, that coming to the end of this project, the user admin / front end templating has been nothing short of incredible. With such a helpful community both here on stackexchange and slack, I feel that I can achieve almost anything with craft!  

---

