Often you need to save data from the login table in session variables for later use. For this purpose, you can use the AfterSuccessfulLogin event.
function AfterSuccessfulLogin($username, $password, $data)
{
$_SESSION["FirstName"] = $data["FirstName"];
}
Then you can use $_SESSION["FirstName"]as the default value of any field or in other events.
See also:
•Session table variables in the WHERE clauses
•Speed up data entry using events
•Limit number of records users can add