• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Retrieving first and last name in hook.js

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieving first and last name in hook.js

    I need to retrieve the user's full name (first and last) in hook.js after the user logs in. I tried using Valence.util.Helper.getValenceRuntime().getLoginDa ta() in the login function as this returns data about the user including the first and last names. But running this function inside the login seems to return null.

    Please help.

  • #2
    Unfortunately, that information isn't available on the login event because it's captured and set after the login event is fired. We will look at possibly changing that, for the time being, you could wrap getLoginData in a setTimeout.

    Thanks

    Comment


    • #3
      Thanks Johnny. I've done what you've suggested and it works.

      I have a related question: Is the Valence.util.Helper.getValenceRuntime() available in the native portal? I want to get the first and last name of the user but it seems this only works in the desktop portal. If so, what can I use as an alternative that would work inside the native portal?

      Thanks.

      Comment


      • #4
        No, the mobile portal doesn't have that information available to running applications. I will add this as a feature request. Thanks

        Comment

        Working...
        X