What is the difference between "current user" and "current page user"?

… and what are some examples of their use?

1 Like

Current User is the User who is current Logged In.

Current Page User is the User who’s Unique Id is in the URL of the page and has been sent from another page (or linked via a URL).

You only get “Current Page User” if you have set Type Of Content for the Page to be User.

“Current User” is mostly for when you have someone logging in and doing stuff themselves (i.e. using your system!).

But if you have an admin system (for example) that allowed you to modify a user in the back end, and you had a list of users, and then navigated to a page and sent a User Id … then the “Current User” would be the Admin User, and the “Current Page User” would be the User you are updating.

We have an App that includes unique emailed links, in the URL we have a UserId, so when someone clicks on the link the User Id in the link is used to set the “Current Page User”. This stops them having to login every time or on different devices. Like a virtual login. When they want to do something on their profile, we then make them log in properly.

19 Likes

Thank you @NigelG for your extensive response.
So if I understand correctly, basically if I don’t plan to have the admin intervene within the app itself, I shouldn’t be messing with “current page user”.

It will only be there if you have set “Type of Content” on your page to be User. Chances are you don’t need it, and “Current User” will be what you want.

The “admin user” is only one example of why you might want to set page user. But unless you want to refer to a particular user on a page, who is NOT the current user, then you probably won’t need it.

1 Like

hi @NigelG. In my app, I’m want a user to be able to access a page that has (limited) information about other user. this would be accessed from a link in a repeating group.

Can I use the Current User Page feature in this scenario in order to pull the details I need? or is there a better way to achieve this?

1 Like

Yes, that is the way I often do it for a “your profile” page. So have the page type as User. Then send the “other” user to the page. That way you have Current User (logged in) and Current Page User (other user) available to work with.

Hi Nigel, in the user profile, how do I replace the unique ID with the current page user’s data field, say username?

1 Like

Let us say that I (Keith) am using your app. I want to navigate to your user profile page (let’s say it’s called /edit_user) so that I can do something like edit my info (update my profile image or my address or whatnot).

There is a button or link in your menu or on the page I am currently on. That button or menu item is labeled, “Edit Profile”.

The click action for that button is:

Navigate > Go to Page: edit_user
Data to send? Current User

(Obviously, the Page object on page edit_user, must be of type User.)

Thanks for your response Keith, I have a repeating group displaying user photo and name. When a person clicks on the view profile button, they are directed to a page called profile. This button also sends current cells user to the page called profile. In the profile page, we can get parametera from url, I can show the user photo and name. Everything works fine, but I want to remove the user id from the url and replace it with just a name.
This is what it currently looks like:


But I want something like this:

Can you guide on how to do this?

Hi @vansokip - this thread may help you. Not sure if @samhouston1107 has it working or not.

thanks, it worked

1 Like

Well, you can do that with some caveats. I wrote up a description of a potential way to do this in another thread. (See the thread for context.) This started as a discussion of domain forwarding but then turned into a question about whether one could do “LinkedIn” style profile page URLs. In this post reply, I detail one approach (which is more-or-less the approach available, if you generalize it):

Hope this helps.

How to do this on single page apps when the type of content is already something else on the page ?