aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/persistence')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java
index 0f30824..18eec18 100644
--- a/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java
+++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/persistence/UserFileDAO.java
@@ -95,7 +95,7 @@ public class UserFileDAO implements UserDAO {
@Override
public User createUser(User user) throws IOException {
synchronized (users) {
- if (getUser(user.getName()) != null) {
+ if (getUser(user.getName()) == null) {
User newUser = new User(user);
users.put(newUser.getName(), newUser);
save();
@@ -131,7 +131,7 @@ public class UserFileDAO implements UserDAO {
/**
* Delete a user matching the name
*
- * @param name The name of the user
+ * @param name The name of the user
*
* @return True if deleted, false otherwise
* @throws IOException If there was an IO issue saving the file