Skip to content

Commit

Permalink
Set id in UserBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony (Juntao) Hu committed Dec 5, 2021
1 parent 820ba9c commit 66b1138
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/com/amigo/user/UserBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public void populate(InterestForm form) {

public User createUser() {
user.setProfile(this.profile);
String id = this.profile.getName().split(" ")[0].toLowerCase() + (int) (1000 * Math.random() + 1);
user.setId(id);
User u = this.user;
reset();
return u;
Expand Down

0 comments on commit 66b1138

Please sign in to comment.