public function viewInfoAction(AccountInterface $account)
    {
        $table = $this->createAdminTable('ucms_user_profile', ['user' => $account]);

        $table->addHeader($this->t("Details"));
        $table->addRow($this->t("Created at"), format_date($account->created));

        $latestConnection = $account->getLastAccessedTime();
        if ($latestConnection) {
            $latestConnection = format_date($latestConnection);
        } else {
            $latestConnection = $this->t("Never");
        }
        $table->addRow($this->t("Last connection at"), $latestConnection);

        $access = $this->getSiteManager()->getAccess();
        $roles = array_map(
            function ($roleId) use ($access) {
                return check_plain($access->getRelativeRoleName($roleId));
            },
            $account->getRoles(true)
        );

        $table->addRow($this->t("Roles"), implode('<br/>', $roles));

        return $table->render();
    }
public function viewInfoAction(AccountInterface $account)
    {
        $table = $this->createAdminTable('ucms_user_profile', ['user' => $account]);

        $table->addHeader($this->t("Details"));
        $table->addRow($this->t("Created at"), format_date($account->created));

        $latestConnection = $account->getLastAccessedTime();
        if ($latestConnection) {
            $latestConnection = format_date($latestConnection);
        } else {
            $latestConnection = $this->t("Never");
        }
        $table->addRow($this->t("Last connection at"), $latestConnection);

        $access = $this->getSiteManager()->getAccess();
        $roles = array_map(
            function ($roleId) use ($access) {
                return check_plain($access->getRelativeRoleName($roleId));
            },
            $account->getRoles(true)
        );

        $table->addRow($this->t("Roles"), implode('<br/>', $roles));

        return $table->render();
    }
public function viewInfoAction ( AccountInterface $ account ) { $ table = $ this -> createAdminTable ( 'ucms_user_profile' , [ 'user' => $ account ] ) ; $ table -> addHeader ( $ this -> t ( "Details" ) ) ; $ table -> addRow ( $ this -> t ( "Created at" ) , format_date ( $ account -> created ) ) ; $ latestConnection = $ account -> getLastAccessedTime ( ) ; if ( $ latestConnection ) { $ latestConnection = format_date ( $ latestConnection ) ; } else { $ latestConnection = $ this -> t ( "Never" ) ; } $ table -> addRow ( $ this -> t ( "Last connection at" ) , $ latestConnection ) ; $ access = $ this -> getSiteManager ( ) -> getAccess ( ) ; $ roles = array_map ( function ( $ roleId ) use ( $ access ) { return check_plain ( $ access -> getRelativeRoleName ( $ roleId ) ) ; } , $ account -> getRoles ( true ) ) ; $ table -> addRow ( $ this -> t ( "Roles" ) , implode ( '<br/>' , $ roles ) ) ; return $ table -> render ( ) ; }
User details display
User details display