From 266b66eb14468f90b958269acfb9ffde1bb0c714 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 9 Feb 2014 17:38:50 +0200 Subject: [PATCH] Used to strtolower for email addresses --- app/controllers/AccountController.php | 6 +++--- app/controllers/ClientController.php | 2 +- app/ninja/repositories/ClientRepository.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 6516bd8462..a8f7166190 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -280,7 +280,7 @@ class AccountController extends \BaseController { } else if ($field == Contact::$fieldEmail && !$contact->email) { - $contact->email = $value; + $contact->email = strtolower($value); } } @@ -500,7 +500,7 @@ class AccountController extends \BaseController { $user->first_name = trim(Input::get('first_name')); $user->last_name = trim(Input::get('last_name')); $user->username = trim(Input::get('email')); - $user->email = trim(Input::get('email')); + $user->email = trim(strtolower(Input::get('email'))); $user->phone = trim(Input::get('phone')); $user->save(); @@ -550,7 +550,7 @@ class AccountController extends \BaseController { $user = Auth::user(); $user->first_name = trim(Input::get('new_first_name')); $user->last_name = trim(Input::get('new_last_name')); - $user->email = trim(Input::get('new_email')); + $user->email = trim(strtolower(Input::get('new_email'))); $user->password = trim(Input::get('new_password')); $user->password_confirmation = trim(Input::get('new_password')); $user->registered = true; diff --git a/app/controllers/ClientController.php b/app/controllers/ClientController.php index 73243348f5..09095e889d 100755 --- a/app/controllers/ClientController.php +++ b/app/controllers/ClientController.php @@ -207,7 +207,7 @@ class ClientController extends \BaseController { $record = Contact::createNew(); } - $record->email = trim($contact->email); + $record->email = trim(strtolower($contact->email)); $record->first_name = trim($contact->first_name); $record->last_name = trim($contact->last_name); $record->phone = trim($contact->phone); diff --git a/app/ninja/repositories/ClientRepository.php b/app/ninja/repositories/ClientRepository.php index 5625a6b77d..0185d2a4f7 100755 --- a/app/ninja/repositories/ClientRepository.php +++ b/app/ninja/repositories/ClientRepository.php @@ -74,7 +74,7 @@ class ClientRepository $contact = Contact::createNew(); } - $contact->email = trim($record['email']); + $contact->email = trim(strtolower($record['email'])); $contact->first_name = trim($record['first_name']); $contact->last_name = trim($record['last_name']); $contact->phone = trim($record['phone']);