mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
fix lavatar shows same letters for every contact not having a photo
caused by wrongly falling back to the contact with contact_id equal to account_id of current user
This commit is contained in:
parent
9047f856d1
commit
ae76eea6f3
@ -179,7 +179,7 @@ export class Et2Avatar extends Et2Widget(SlotMixin(SlAvatar)) implements et2_IDe
|
||||
|
||||
if (!_contactId)
|
||||
{
|
||||
parsedId = this.egw().user('account_id');
|
||||
parsedId = null;
|
||||
}
|
||||
else if(_contactId.substr(0, 8) === 'account:')
|
||||
{
|
||||
@ -200,7 +200,11 @@ export class Et2Avatar extends Et2Widget(SlotMixin(SlAvatar)) implements et2_IDe
|
||||
let oldContactId = this._contactId;
|
||||
this._contactId = _contactId;
|
||||
// if our image (incl. cache-buster) already includes the correct id, use that one
|
||||
if(!this.image || !this.image.match("(&|\\?)" + id + "=" + encodeURIComponent(parsedId) + "(&|$)"))
|
||||
if (!parsedId)
|
||||
{
|
||||
this.image = null;
|
||||
}
|
||||
else if(!this.image || !this.image.match("(&|\\?)" + id + "=" + encodeURIComponent(parsedId) + "(&|$)"))
|
||||
{
|
||||
params[id] = parsedId;
|
||||
this.image = egw.link('/api/avatar.php', params);
|
||||
|
Loading…
Reference in New Issue
Block a user