This topic is locked

Logged as

2/2/2008 2:56:21 PM
ASPRunnerPro General questions
J
juns author

ID table
User name: test

Pass: 951999

Logged as: Alisson Juns Gomes
I need after login shows "Logged as" not "User name"

J
Jane 2/4/2008

Hi,
you can do the following:

  1. save first and last name is the Session variables in the AfterSuccessfulLogin event on the Events tab.

    Here is a sample:
    str = "select FirstName, LastName from TableName where UserName='" & Session("UserID") & "'"

    Set rsTemp = server.CreateObject("ADODB.Recordset")

    rsTemp.open str, dbConnection

    Session("fullname") = rsTemp("FirstName") & " " & rsTemp("LastName")

    rsTemp.Close : set rsTemp = Nothing



where FirstName, LastName and UserName are your actual field names, TableName is your actual table name.
2. then add following code to the List page: Before Display event:

smarty("userid") = Session("fullname")

J
juns author 2/4/2008

Thank you. Works fine. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=25530&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />
But now I need a event in the Before record update:
dict("Updated") = Session("UserID")
I need shows "Logged as" not "User name" again
PS.: Sorry my english. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=25530&image=2&table=forumreplies' class='bbc_emoticon' alt=':(' />

J
Jane 2/5/2008

Hi,
use Session("fullname") in any places where you want to replace username with actual user name.

J
juns author 2/11/2008

Hi,

use Session("fullname") in any places where you want to replace username with actual user name.


Thank you!!!!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=25710&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=25710&image=2&table=forumreplies' class='bbc_emoticon' alt=':lol:' />