Jump to content
  • 0

Add timestamp and login UserID to login table using html datapage


techguy

Question

Hi,

I have an html datapage using a script on this forum to route traffic a specific html page and log into the app. Using this method I need help figuring out how to create  a log that tracks the login of the app. I know there are logs on the back side that I can look this up but I want to create  table that store the login of the users to the app for me to make a field with last user login.

Any way to create a html datapage using the script below that will also log the timestamp and userID of the person logging into the app in a loggin table I created? 

 

How does everyone else create a login table to track users etc?

 

<script>
if("[@authfield:Role]" == "Admin"){
window.location = "admin.html?UserID=[@authfield:User_ID]";
}
else if("[@authfield:Role]" == "Agent"){
window.location = "actionlog.html?UserID=[@authfield:User_ID]&FN=[@authfield:First_Name]&LN=[@authfield:Last_Name]";
}
else{
window.location = "oops.html";
}
</script>

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

 

Create a table with timestamp, user ID and any URL fields. Create a submission page based on this form. Enable auth and include all the fields to right.

Select hidden as form element for all fields.

For URL check to receive system parameter >> Host URL

For User ID check to receive Authentication Fields >> UserName

Add JS to auto submit the code to an HTML Block added at the end of the elements: 

Then in destination page add the URL  user needs to be redirected to when they login

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...