When edit "Account"/ "User", login field data is "blanked"

Erick Hernandez 6 years ago

As decribed, but all context and story:
I am implementing traccar for my enterprise. I need login with "login" field in "Users" table, and store a valid email in "email" field, to send email reports.
When i edit an user, from admin session, email data is overwritten by login field data, and login field data is blanked.
Before modify:
Before

After modify:
After

After that, i edit traccar.xml file, adding this entry:

        SELECT * FROM tc_users
        WHERE login = :email
    </entry>```

and this solve my problem (apparently): I edit whatever user, and no email overwritten, and no login blanked.

But, when I enter to "Account" or "Users" and modify my own account,
![Menu](https://user-images.githubusercontent.com/66650830/84092729-e854b500-a9bd-11ea-8b04-f9df5b021da9.png)
login data is "blanked", and email is preserved, and this is a big problem with data consistency, because this traccar users are logining by login, not email:
![login](https://user-images.githubusercontent.com/66650830/84091660-b7bf4c00-a9ba-11ea-93fb-6f0d5bf44ad9.png)

I've search throuhgout forums but no similar info to help me fix the problem, only references about LDAP integration, but my traccar isn't with it, so I think is convenient handle this as an important bug, unless a fix or solutions already exists.

Thanks a lot.
Anton Tananaev 6 years ago

What happens if you do following:

  1. Manually set "login" in the database
  2. Restart Traccar service
  3. Edit email from the web app

Does the login get cleared?

Erick Hernandez 6 years ago

Now, login was not cleared after restart Traccar service and editing email.

There was a a problem with my database consistency, because of manual setting in the table?

Anton Tananaev 6 years ago

Yes, Traccar has internal cache which is not updated when you manually edit database.

Erick Hernandez 6 years ago

Ok, i never did a traccar service restart on my previous tests.

Thank you again.