Answers.Body: <p>In Craft, there is no difference between the currently logged in user in the CP, and the currently logged in frontend user. Whenever a user logs in (be it through a frontend form, or the CP login page), it results in that user being logged in. Period. There's no 'being logged in in the frontend', as far as Craft is concerned.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-16T08:55:37.613Z
Answers.Text: Thank you. I understand how it works now :)
Answers.UserDisplayName: André Castro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-16T08:18:32.437Z
Answers.LastActivityDate: 2019-04-16T08:18:32.437Z
Answers.UserDisplayName: Paul
Body: <p>I'm using Craft Pro to make a website where users have a private area. Users register and when login happens they are redirected to a page in the private area with respective info about that user.</p>
  
  <p>When i use <code>{% requireLogin %}</code> with <code>{{ currentUser.id }}</code> Craft 3 outputs the ID of the user that has active login in the CP (control panel).</p>
  
  <p>But what I need is the ID of the user that made login in the frontend to access private area and not user ID that is logged in CP.</p>
  
  <p>I'm reading the Craft 3 docs but I didn't find the answer I'm looking for.</p>
  
  <p>Any suggestions?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-16T08:14:28.170Z
Comments.Text: The logged in user on the front and and the control panel are the same - the only difference is whether that user has permission to access the control panel. If I'm reading your question right, are you saying that a user logs in to look at another user's data, not their own?
Comments.UserDisplayName: darylknight
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-16T08:23:42.140Z
Comments.Text: No. Users can register in the frontend, and then can fill a login form where they will be able to submit PDF files that can be read by the admin in control panel. How can i get that particular just logged in user profile in frontend?
Comments.UserDisplayName: André Castro
Tags: <templating><craft3><login>
Title: How do you get the user id on the front-end?
ThreadText: # How do you get the user id on the front-end?
  
  (Asked by: username_0 on 2019-04-16)
  
  I'm using Craft Pro to make a website where users have a private area. Users register and when login happens they are redirected to a page in the private area with respective info about that user.
  
  When i use `{% requireLogin %}` with `{{ currentUser.id }}` Craft 3 outputs the ID of the user that has active login in the CP (control panel).
  
  But what I need is the ID of the user that made login in the frontend to access private area and not user ID that is logged in CP.
  
  I'm reading the Craft 3 docs but I didn't find the answer I'm looking for.
  
  Any suggestions?
  
  **Tags:** templating, craft3, login
  
  > **Comments:**
  > **username_1**: The logged in user on the front and and the control panel are the same - the only difference is whether that user has permission to access the control panel. If I'm reading your question right, are you saying that a user logs in to look at another user's data, not their own?  
  > **username_0**: No. Users can register in the frontend, and then can fill a login form where they will be able to submit PDF files that can be read by the admin in control panel. How can i get that particular just logged in user profile in frontend?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-04-16. Score: 1 | Accepted answer
  
  In Craft, there is no difference between the currently logged in user in the CP, and the currently logged in frontend user. Whenever a user logs in (be it through a frontend form, or the CP login page), it results in that user being logged in. Period. There's no 'being logged in in the frontend', as far as Craft is concerned.
  
  > **Comments:**
  > **username_0**: Thank you. I understand how it works now :)  
  
  ---
  
  