Retrieve Current User using SQL query - Mendix Forum

Retrieve Current User using SQL query

0

This query retrieves the current user's name by matching the user ID from the system$session_user table with the id in the system$user table. It identifies the logged-in user based on their session data and fetches their name accordingly.

 

SELECT "name"
FROM "PUBLIC"."system$user"
WHERE "id" = (
    SELECT "system$userid"
    FROM PUBLIC.PUBLIC."system$session_user"
    LIMIT 1
);

 

asked
1 answers

Hello,

I would like to know what the purpose of this need is as from Mendix in a microflow you can get a user too.

 

Thank you.

Created