From 67c4b510c1318ebe8a40adfa43ce45c4ef245bd3 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 21 Apr 2022 15:46:50 +0000 Subject: [PATCH] Added User.getEmail --- lib/User.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/User.js b/lib/User.js index c7176a0..b959c83 100644 --- a/lib/User.js +++ b/lib/User.js @@ -117,6 +117,10 @@ class User { return `${this.firstName} ${this.lastName}`; } + getEmail() { + return `${this.fullName} <${this.email}>`; + } + async verifyPassword(password) { return await bcrypt.compare(password, this.#password); }