From b2e7c6ffa115499b9269c5f0dc0770b406406650 Mon Sep 17 00:00:00 2001 From: billyboy35 Date: Fri, 10 May 2024 10:49:19 +0200 Subject: [PATCH] Fixe SMEWebify/WebErpMesv2/issues/379 --- app/Models/User.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 3ae561ae..fc244afa 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -236,26 +236,12 @@ public function getActivitylogOptions(): LogOptions } // Encrypt while setting - public function setEmailAttribute($value) - { - $this->attributes['email'] = Crypt::encrypt($value); - } - - // Decrypt while getting - public function getEmailAttribute($value) - { - try { - return decrypt($value); - } catch (\Illuminate\Contracts\Encryption\DecryptException $e) { - return null; - } - } - - public function setPersonnalPhoneNumberAttribute($value) + public function setPersonnalPhoneNumberAttribute($value) { $this->attributes['personnal_phone_number'] = Crypt::encrypt($value); } + // Decrypt while getting public function getPersonnalPhoneNumberAttribute($value) { try {