diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 2 | ||||
-rw-r--r-- | src/org/traccar/model/User.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index b7d3cb1e4..2e3e68bc9 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -297,7 +297,7 @@ public class DataManager { public User login(String email, String password) throws SQLException { User user = QueryBuilder.create(dataSource, getQuery("database.loginUser")) - .setString("email", email) + .setString("email", email.trim()) .executeQuerySingle(User.class); if (user != null && user.isPasswordValid(password)) { return user; diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java index b71666f87..3557521ab 100644 --- a/src/org/traccar/model/User.java +++ b/src/org/traccar/model/User.java @@ -43,7 +43,7 @@ public class User extends ExtendedModel { } public void setEmail(String email) { - this.email = email; + this.email = email.trim(); } private String phone; |