Skip to main content
Known Participant
September 14, 2015
Answered

How can I get the username of the current user? Not the user's name, but the username is logged in with.

  • September 14, 2015
  • 1 reply
  • 1446 views

Does anyone know how I can get the username of the current user? Not the user's name, but the username is logged in with.

Thank you!

    This topic has been closed for replies.
    Correct answer RodWard

    Hey Rick!

    Thanks for trying to help, but what i am attempting has nothing to do with the User Account on the computer.

    When someone logs in to an LMS they are do that with an username. I am trying to get that username from Captivate/Javascript.


    The only two variables that Captivate gives you to work with are cpQuizInfoStudentName and cpQuizInfoStudentID but the latter is only really designed to be used for the Internal Server Reporting solution, not a typical SCORM LMS.

    Sounds to me like you may need to get hold of the services of a JavaScript programmer.

    1 reply

    Lilybiri
    Legend
    September 14, 2015

    There is a user variable created automatically with each Captivate file: cpQuizInfoStudentName. If you are using a LMS, for some of them this var will get automatically a value equal to name used in the login, but I am not sure that is the case for every LMS.

    Sent from my iPad

    Known Participant
    September 14, 2015

    Thank you for the prompt response.

    Right now i am doing something like this:

    var objCP = document.Captivate;

    var thename = GetStudentName();

    and i get the student name, not the username - i would imagine the "cpQuizInfoStudentName" is the same thing.

    Captiv8r
    Legend
    September 14, 2015

    Sounds like you are wanting the name of the User Account of the computer?

    Maybe the link below helps?

    Click here to view

    Cheers... Rick