This topic is locked
[SOLVED]

display user id from login

9/1/2021 10:08:09 AM
PHPRunner General questions
M
m.salahi author

hi every one

i want to display user id (pk of users table ) that is login
cause i want to make it as default value of text field

img alt

admin 9/1/2021

Check setDisplayName() function of Security API.

M
m.salahi author 9/5/2021

thanks admin to help me

but i want the primary key of the userid that is login

when i used $SESSION["UserID"]
it display the username
but i want primary key of the user that is login

aadham 9/5/2021

You can try this in AfterSuccessfulLogin event of Login Page, if I understood you correctly:

$user = DBLookup("select **emp_id** from **employees** where **emp_login** ='".$username."'");
$str = $user ;
Security::setDisplayName($str);
M
m.salahi author 9/24/2021

thanks aadham9...