Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-12T21:25:41.700Z
Answers.LastActivityDate: 2018-10-12T21:25:41.700Z
Answers.UserDisplayName: Robin Schambach
Body: <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>
  
Tags: <craft3><users>
Title: Getting a entry link created by current User
ThreadText: # 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) %}
  <a href="{{ userProfiles.url() }}">My Profile</a>
  
  ```
  
  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() %} 
  <a href="{{ myEntry.getUrl() }}">My Profile</a>
  
  ```
  
  You should also consider to code defensively and check if there is a current user and if `myEntry` is not null
  
  
  ---
  
  