Hi! I made a simple user managment function that allows me to create a user and upload a credential dataframe.
observeEvent(input$btnCreateUser,{
load(file = "./RDA/credentials.rda")
if ((input$DniID %in% credentials$dni) == F & (input$user %in% credentials$user) == F) {
u1 <- data.frame(
user = input$user, # mandatory
password = input$password,
level = 0,
nombre = input$NombreId,
apellido = input$ApellidoId,
dni = input$DniID
)
credentials <- rbind(credentials,u1)
save(credentials,file = "./RDA/credentials.rda")
showNotification("Usuario Creado correctamente",duration = 5,closeButton = T,type = "message")
load(file = "./RDA/credentials.rda", envir = .GlobalEnv)
output$tablaUsuarios <-
DT::renderDataTable(DT::datatable(credentials))
updateTextInput(session, "NombreId", value = " ")
updateTextInput(session, "ApellidoId", value = " ")
updateTextInput(session, "user", value = " ")
updateNumericInput(session, "DniID", value = 0)
}
else{
showNotification("No se puede crear el usuario: DNI o USUARIO ya existente",duration = 5,closeButton = T,type = "error")
}
},ignoreInit = T)
The problem with this is that when I logout and try to use this new user the credentials dataframe does not load, even when I call it again after I saving it.
Hi! I made a simple user managment function that allows me to create a user and upload a credential dataframe.
The problem with this is that when I logout and try to use this new user the credentials dataframe does not load, even when I call it again after I saving it.
` load(file = "./RDA/credentials.rda", envir = .GlobalEnv)
I tried to load the data frame in this line again, but it only accept data frames.
I tried this but does not work.