your login page will store the logged in users ID in a session variable. If you are using security assist, double click the authenticate user server behavior. Go to the third page of the wizard, the names of the session variables that re created on log in will be listed here.
No, you do not need to enter the name o the session, the only code that needs to be modified at all is:
$userSession = $_SESSION['UserID'];
this code just needs to substitute UserID with the name of your user session.