change_user_details method username change logic fixed
parent
a78f0bd47e
commit
3bde666802
|
@ -180,9 +180,11 @@ public class System {
|
||||||
if(username.equals("")||hometown.equals("")||zip.equals(""))
|
if(username.equals("")||hometown.equals("")||zip.equals(""))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for(User user: this.all_user)
|
if(!current_user.getUsername().equals(username)){
|
||||||
if(user.getUsername().equals(username))
|
for(User user: this.all_user)
|
||||||
return false;
|
if(user.getUsername().equals(username))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<String> mem = search(zip);
|
ArrayList<String> mem = search(zip);
|
||||||
boolean bool = false;
|
boolean bool = false;
|
||||||
|
@ -191,7 +193,7 @@ public class System {
|
||||||
if(line.split(";")[1].equals(hometown)) {
|
if(line.split(";")[1].equals(hometown)) {
|
||||||
bool = true;
|
bool = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!bool)
|
if(!bool)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue