mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Return user name when display name is unknown
This commit is contained in:
parent
743661ca90
commit
afe65bdc3f
@ -128,7 +128,13 @@ public class OwnCloudAccount {
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
if (mDisplayName != null && mDisplayName.length() > 0) {
|
||||
return mDisplayName;
|
||||
} else if (mCredentials != null) {
|
||||
return mCredentials.getUsername();
|
||||
} else {
|
||||
return "NONE";
|
||||
}
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
|
@ -59,10 +59,10 @@ public class GetRemoteUserNameOperation extends RemoteOperation {
|
||||
private static final String NODE_DISPLAY_NAME= "display-name";
|
||||
private static final String NODE_EMAIL= "email";
|
||||
|
||||
private String mUserName;
|
||||
private String mDisplayName;
|
||||
|
||||
public String getUserName() {
|
||||
return mUserName;
|
||||
public String getDisplayName() {
|
||||
return mDisplayName;
|
||||
}
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ public class GetRemoteUserNameOperation extends RemoteOperation {
|
||||
ArrayList<Object> data = new ArrayList<Object>();
|
||||
data.add(displayName);
|
||||
result.setData(data);
|
||||
mUserName = displayName;
|
||||
mDisplayName = displayName;
|
||||
|
||||
Log_OC.d(TAG, "*** Parsed user information: " + id + " - " + displayName + " - " + email);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user