aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index af2dd559a..8be6aec42 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -241,7 +241,11 @@ public class DataManager implements IdentityManager {
User user = QueryBuilder.create(dataSource, getQuery("database.loginUser"))
.setString("email", email)
.executeQuerySingle(new User());
- return user != null && user.isPasswordValid(password) ? user : null;
+ if (user != null && user.isPasswordValid(password)) {
+ return user;
+ } else {
+ return null;
+ }
}
public Collection<User> getUsers() throws SQLException {