rshinyrsconnect

Get actual username in RS connect


I have published the shiny application on RS connect. I need to print the actual username who ever is using the application. So for this, I have called session$user in order to get a actual username. Is it correct? Can anyone please confirm?


Solution

  • Yeah. That´s correct. To extract only the user you can use:

    user <- session$user %>% str_extract("([^@]+)")