Help in Traccar UI needed

Jose B4 years ago

Today I use MyId = Traccar.app.getUser().getId() in SettingsMenuController.js to obtain the userID of user connected.

I would like to know how I get the "name user"? (like userId "21" = "John")

thank for future help

JB

Anton Tananaev4 years ago

Read ExtJS documentation on the model class:

https://docs.sencha.com/extjs/6.2.0/classic/Ext.data.Model.html

Jose B4 years ago

I read the documentation and I tried Traccar.app.getUser().get('name'); and Traccar.app.getUser().get('username'); but did not work.

What I did worng?

JB