diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2022-02-13 23:34:25 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2022-02-13 23:34:25 -0800 |
commit | 1c73bae2e23242673e0a07cdbc2493700f134ceb (patch) | |
tree | d1105368628b5f64fabb657682df58f1641e4d54 /src/main/java/org/traccar/database/UsersManager.java | |
parent | de110b28ce8adb6ba875d88ede6e8f86dae4dd48 (diff) | |
download | trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.gz trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.bz2 trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.zip |
New storage implementation
Diffstat (limited to 'src/main/java/org/traccar/database/UsersManager.java')
-rw-r--r-- | src/main/java/org/traccar/database/UsersManager.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/database/UsersManager.java b/src/main/java/org/traccar/database/UsersManager.java index b741a85b6..31759dc8b 100644 --- a/src/main/java/org/traccar/database/UsersManager.java +++ b/src/main/java/org/traccar/database/UsersManager.java @@ -21,6 +21,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import org.traccar.model.User; +import org.traccar.storage.StorageException; public class UsersManager extends SimpleObjectManager<User> { @@ -59,6 +60,14 @@ public class UsersManager extends SimpleObjectManager<User> { } @Override + public void updateItem(User user) throws StorageException { + if (user.getHashedPassword() != null) { + getDataManager().updateUserPassword(user); + } + super.updateItem(user); + } + + @Override protected void removeCachedItem(long userId) { User cachedUser = getById(userId); if (cachedUser != null) { |