create user functionality

This commit is contained in:
Branislav Stojkovic
2016-10-22 20:58:53 +02:00
parent ff019542f8
commit 71534e065b
2 changed files with 18 additions and 2 deletions
@@ -158,6 +158,20 @@ public class CloudPresenter {
}
public void createUserAccount(String username, String password,
String email, String website, String bio) throws CloudException {
try {
String res = service.createUser(username, password, email, website,
bio);
if (res == null)
throw new CloudException("Could not create user account.");
if (!SUCCESS.equals(res))
throw new CloudException(res);
} catch (Exception e) {
throw new CloudException(e);
}
}
public UserEntity getUserDetails() throws CloudException {
String username = ConfigurationManager.getInstance().readString(
USERNAME_KEY, null);