From 6941280996345b23429616b4f65a9ffcbd88395e Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Thu, 16 Aug 2018 20:32:16 +0530 Subject: [PATCH] Important update for email ###Very important update for emails Handling cipher update scenario for decrypt email password Not loading email passoword on edit page to secure email account --- app/Model/helpdesk/Email/Emails.php | 8 ++++++-- .../default1/admin/helpdesk/emails/emails/edit.blade.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Model/helpdesk/Email/Emails.php b/app/Model/helpdesk/Email/Emails.php index 0468b64db..35f685f3d 100644 --- a/app/Model/helpdesk/Email/Emails.php +++ b/app/Model/helpdesk/Email/Emails.php @@ -60,8 +60,12 @@ class Emails extends BaseModel public function getPasswordAttribute($value) { - if ($value) { - return \Crypt::decrypt($value); + try{ + if ($value) { + return \Crypt::decrypt($value); + } + } catch(\Exception $e) { + return null; } return $value; diff --git a/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php b/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php index 60e67186d..eb8e4ed46 100644 --- a/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/emails/emails/edit.blade.php @@ -67,7 +67,7 @@ class="active"
{!! Form::label('password',Lang::get('lang.password')) !!} * {!! $errors->first('password', ':message') !!} - password !!} > +