<p>You need to fetch the entry with <code>one()</code> keep in mind in order to be able to be an author the user needs the permission to create entries in that section </p>

<pre><code>{% set myEntry = craft.entries.section('userProfiles').authorId(currentUser.id).one() %} 
&lt;a href="{{ myEntry.getUrl() }}"&gt;My Profile&lt;/a&gt;
</code></pre>

<p>You should also consider to code defensively and check if there is a current user and if <code>myEntry</code> is not null </p>

CC BY-SA 4.0
2018-10-12T21:25:41.700Z
2018-10-12T21:25:41.700Z
Robin Schambach
<p>I am trying to create a link that would allow a logged in user to access their profile from the front end. Basically, the user has one page they can edit from the front end when logged in, and I'd like to link to that page in the navigation. I've seen similar things done in Craft 2 but not in Craft 3. So far I tried this: but it didn't work. </p>

<pre><code>{% set myEntry = craft.entries.section('userProfiles').authorId(currentUser.id).limit(1) %}
&lt;a href="{{ userProfiles.url() }}"&gt;My Profile&lt;/a&gt;
</code></pre>

<p>as well as..</p>

<pre><code>{{ myEntry.limit(1).url() }}
</code></pre>

<p>Thank you!</p>

<craft3><users>
Getting a entry link created by current User
# Getting a entry link created by current User

(Asked by: username_0 on 2018-10-12)

I am trying to create a link that would allow a logged in user to access their profile from the front end. Basically, the user has one page they can edit from the front end when logged in, and I'd like to link to that page in the navigation. I've seen similar things done in Craft 2 but not in Craft 3. So far I tried this: but it didn't work. 
{% set myEntry = craft.entries.section('userProfiles').authorId(currentUser.id).limit(1) %}
My Profile

as well as..
{{ myEntry.limit(1).url() }}

Thank you!

**Tags:** craft3, users

---

## 1 answers

### Answer by username_1 on 2018-10-12. Score: 1

You need to fetch the entry with one() keep in mind in order to be able to be an author the user needs the permission to create entries in that section 
{% set myEntry = craft.entries.section('userProfiles').authorId(currentUser.id).one() %} 
My Profile

You should also consider to code defensively and check if there is a current user and if myEntry is not null


---

