Fix NPE on usermodel account type checking
Change-Id: I964381a896e8c8bf8cce5f19a83fd7c33ef5c9bd
| | |
| | | user.emailAddress = config.getString(USER, username, EMAILADDRESS);
|
| | | user.accountType = AccountType.fromString(config.getString(USER, username, ACCOUNTTYPE));
|
| | | if (Constants.EXTERNAL_ACCOUNT.equals(user.password) && user.accountType.isLocal()) {
|
| | | user.accountType = null;
|
| | | user.accountType = AccountType.EXTERNAL;
|
| | | }
|
| | | user.organizationalUnit = config.getString(USER, username, ORGANIZATIONALUNIT);
|
| | | user.organization = config.getString(USER, username, ORGANIZATION);
|
| | |
| | | }
|
| | |
|
| | | public boolean isLocalAccount() {
|
| | | return !Constants.EXTERNAL_ACCOUNT.equals(password) || accountType.isLocal();
|
| | | return !Constants.EXTERNAL_ACCOUNT.equals(password)
|
| | | || accountType == null
|
| | | || accountType.isLocal();
|
| | | }
|
| | |
|
| | | /**
|