Skip to content

Commit

Permalink
AddressBook: get the right username for address books when the user s…
Browse files Browse the repository at this point in the history
…etting is the user mail and the domain setting is empty (fix #325 and #290)
  • Loading branch information
Trim authored and bavincen committed Sep 22, 2015
1 parent f4de403 commit ca72783
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,18 @@ exchangeAbDistListDirectory.prototype = {
},

get user() {
return this.domain+"\\"+exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
var username = exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
if (username.indexOf("@") > -1) {
return username;
}
else {
if (this.domain == "") {
return exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
}
else {
return this.domain+"\\"+exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
}
}
},

set user(value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,18 @@ try {
},

get user() {
return this.domain+"\\"+exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
var username = exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
if (username.indexOf("@") > -1) {
return username;
}
else {
if (this.domain == "") {
return exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
}
else {
return this.domain+"\\"+exchWebService.commonFunctions.safeGetCharPref(this.prefs, "user", "");
}
}
},

set user(value) {
Expand Down

0 comments on commit ca72783

Please sign in to comment.