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 {