Get actual username in RS connect

244 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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

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