This topic is locked

How change 'Logged on as' message

11/17/2010 2:12:45 PM
ASPRunnerPro Tips and tricks
admin

This message can be changed in the List page: Before display event on the Eventstab. Here is how you can display user full name instead of username (make sure to replace field and table names with real ones):

set rs = CustomQuery("select Firstname, Lastname from Users where Username='" & SESSION("UserID") & "'")

xt.assign "username", rs("Firstname") & " " & rs("Lastname")
B
Brad 6/18/2011



This message can be changed in the List page: Before display event on the Eventstab. Here is how you can display user full name instead of username (make sure to replace field and table names with real ones):

set rs = CustomQuery("select Firstname, Lastname from Users where Username='" & SESSION("UserID") & "'")

xt.assign "username", rs("Firstname") & " " & rs("Lastname")



Hi
I am trying to utilise this.

I have a user table named - RFW_Users

With the following fields. IDUser, Username, FirstName and Surname.

I have changed the script to the following and added it as an event on the list page Before Display (which is giving an error)
set rs = CustomQuery("select FirstName, Surname from RFW_Users where Username='" & SESSION("IDUser") & "'")

xt.assign "Username", rs("FirstName") & " " & rs("Surname")
Can anyone see what I am doing wrong. (6.3 ASPRunner)
Thanks in advance

chicka

admin 6/20/2011

SESSION("IDUser") is incorrect. Use Session("UserID").

need2sleepDevClub member 4/21/2020

Is there a way to do this for all pages? Wondering if there is a better way to do this with 10.4?

need2sleepDevClub member 4/21/2020



Is there a way to do this for all pages? Wondering if there is a better way to do this with 10.4?


Used this info: https://xlinesoft.com/phprunner/docs/security_screen.htm
$_SESSION["UserName"] = $_SESSION["FullName"];