From 28e2de65caad4d60f0f80757a6dde65c02c0e4b8 Mon Sep 17 00:00:00 2001 From: miguel456 Date: Tue, 23 Aug 2022 02:03:51 +0100 Subject: [PATCH] feat(users): add check for discord account connection --- app/User.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/User.php b/app/User.php index 52ce4a7..92b7ea4 100755 --- a/app/User.php +++ b/app/User.php @@ -149,6 +149,15 @@ class User extends Authenticatable implements MustVerifyEmail } } + /** + * Check if user linked their Discord account + * + * @return bool + */ + public function hasDiscordConnection(): bool { + return !is_null($this->discord_token) && !is_null($this->discord_refresh_token); + } + public function routeNotificationForSlack($notification) {