From 35b5bc2263ccb31252e42792f53a07c2999a9183 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 29 Dec 2018 15:04:27 +1100 Subject: [PATCH] Fix sendmail and improve register error catching --- app/Classes/Control/Register.php | 11 ++++++----- app/Mail/SendToken.php | 2 +- config/mail.php | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/Classes/Control/Register.php b/app/Classes/Control/Register.php index 0416fb6..74bf8da 100644 --- a/app/Classes/Control/Register.php +++ b/app/Classes/Control/Register.php @@ -165,13 +165,14 @@ class Register extends Control public function process() { $o = new User; - $o->login = $this->data['user']; - $o->email = $this->data['email']; - $o->password = $this->data['password']; - $o->name = $this->data['name']; - $o->location = $this->data['location']; try { + $o->login = $this->data['user']; + $o->email = $this->data['email']; + $o->password = $this->data['password']; + $o->name = $this->data['name']; + $o->location = $this->data['location']; + $o->save(); $this->so->sendBaseline($this->so->client(), GREEN . 'ACCOUNT CREATED, PRESS '.HASH.' TO CONTINUE...'.WHITE); $this->state['action'] = ACTION_NEXT; diff --git a/app/Mail/SendToken.php b/app/Mail/SendToken.php index 3016beb..78f1a46 100644 --- a/app/Mail/SendToken.php +++ b/app/Mail/SendToken.php @@ -37,4 +37,4 @@ class SendToken extends Mailable ->subject('Token to complete registration') ->with(['token'=>$this->token]); } -} +} \ No newline at end of file diff --git a/config/mail.php b/config/mail.php index f400645..2a810f0 100644 --- a/config/mail.php +++ b/config/mail.php @@ -99,7 +99,7 @@ return [ | */ - 'sendmail' => '/usr/sbin/sendmail -bs', + 'sendmail' => '/usr/sbin/sendmail -t', /* |--------------------------------------------------------------------------