Getting user information

Hi Nextclouders,

If we suppose that a user is logged in nextcloud server, and he open a new tab in his http client to execute a new application (in php for exemple) on the SAME server.
And, in this application, we need to know the user id.

By inspection of the mysql log we can see that a session is stored into oc_authtoken but it don’t content the cookie value, so it’s difficult to identify the user.
And the occ command give nothing about logged user (except misunderstanding … :wink:

So, my question is :slight_smile:
how identify the user with a simple command ?

Thank you very much.

Best regards.

Patrick