This topic is locked

Best solution to store a logged in User Record ID #

12/7/2016 3:48:01 PM
PHPRunner General questions
R
ringlis1 author

There is a session variable for username and event the user full name. However, what is the best solution if I would like to store the Users Record Number instead.
I tried to add a session variable on the After successful login event.

function AfterSuccessfulLogin($username, $password, $data)
{

$_SESSION["UID"] = $data["UserID"];

}


The table I have uses UserID which is a unique autonumber and set as an int.
I would like to store the user record number on an Add Record form.

Sergey Kornilov admin 12/7/2016

In event like BeforeAdd use the following:

$values["Some field] = $_SESSION["UID"];