diff --git a/src/components/user-avatar/user-avatar.ts b/src/components/user-avatar/user-avatar.ts index cb1243e1d..a8e9d6bc7 100644 --- a/src/components/user-avatar/user-avatar.ts +++ b/src/components/user-avatar/user-avatar.ts @@ -44,7 +44,6 @@ export class CoreUserAvatarComponent implements OnInit, OnChanges, OnDestroy { // Variable to check if we consider this user online or not. // @TODO: Use setting when available (see MDL-63972) so we can use site setting. protected timetoshowusers = 300000; // Miliseconds default. - protected myUser = false; protected currentUserId: number; protected pictureObs; @@ -91,9 +90,6 @@ export class CoreUserAvatarComponent implements OnInit, OnChanges, OnDestroy { this.userId = this.userId || (this.user && (this.user.userid || this.user.id)); this.courseId = this.courseId || (this.user && this.user.courseid); - - // If not available we cannot ensure the avatar is from the current user. - this.myUser = this.userId && this.userId == this.currentUserId; } /** @@ -102,7 +98,7 @@ export class CoreUserAvatarComponent implements OnInit, OnChanges, OnDestroy { * @return boolean */ isOnline(): boolean { - if (this.myUser || this.utils.isFalseOrZero(this.user.isonline)) { + if (this.utils.isFalseOrZero(this.user.isonline)) { return false; }