shiny use renderUI

I want to get user information from the database, and then render the bs4UserMenu function, but it doesn’t seem to work.How should I do?

if (interactive()) {
  library(shiny)
  library(bs4Dash)
  list <- list(name = "Divad Nojnarg")
  shinyApp(
    ui = dashboardPage(
      navbar = dashboardHeader(
        rightUi = uiOutput("user"),
      sidebar = dashboardSidebar(),
      body = dashboardBody(),
      title = "bs4UserMenu"
    )),
    server = function(input, output) {
      output$user <- renderUI({
        bs4UserMenu(
          name = list$name, 
          status = "primary",
          src = "https://adminlte.io/themes/AdminLTE/dist/img/user2-160x160.jpg", 
          title = "bs4Dash",
          subtitle = "Author", 
          footer = p("The footer", class = "text-center"),
          "This is the menu content."
        )
      })
    }
  )
}

What database? There is no database here.

I have solved it, thanks. :grinning: