From 7b538be82e137c2821165b13d9cb675d319151b9 Mon Sep 17 00:00:00 2001 From: Aselsan Date: Fri, 17 May 2024 22:22:55 +0700 Subject: [PATCH] fix: Undefined property: stdClass::$family_name when register a new user --- src/Libraries/GoogleOAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Libraries/GoogleOAuth.php b/src/Libraries/GoogleOAuth.php index 0d546da..eb795d2 100644 --- a/src/Libraries/GoogleOAuth.php +++ b/src/Libraries/GoogleOAuth.php @@ -110,7 +110,7 @@ protected function setColumnsName(string $nameOfProcess, $userInfo): array 'password' => random_string('crypto', 32), 'active' => $userInfo->email_verified, $this->config->usersColumnsName['first_name'] => $userInfo->given_name, - $this->config->usersColumnsName['last_name'] => $userInfo->family_name, + $this->config->usersColumnsName['last_name'] => $userInfo->family_name ?? null, $this->config->usersColumnsName['avatar'] => $userInfo->picture, ]; }