diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index d82c2ebccf32..68ef3b41ebad 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -500,7 +500,7 @@ class AccountController extends \BaseController { } else { - $account = Account::findOrFail(Auth::user()->account_id); + $account = Auth::user()->account; $account->name = trim(Input::get('name')); $account->work_email = trim(Input::get('work_email')); $account->work_phone = trim(Input::get('work_phone')); diff --git a/app/handlers/UserEventHandler.php b/app/handlers/UserEventHandler.php index 31753f6a0157..5e6a24955287 100755 --- a/app/handlers/UserEventHandler.php +++ b/app/handlers/UserEventHandler.php @@ -17,11 +17,11 @@ class UserEventHandler public function onLogin() { - $account = Auth::user()->account; - $account->last_login = Carbon::now()->toDateTimeString(); - $account->save(); + $account = Auth::user()->account; + $account->last_login = Carbon::now()->toDateTimeString(); + $account->save(); - Event::fire('user.refresh'); + Event::fire('user.refresh'); } public function onRefresh() diff --git a/app/models/Account.php b/app/models/Account.php index 208ec4541dc1..f821fb009e86 100755 --- a/app/models/Account.php +++ b/app/models/Account.php @@ -166,7 +166,7 @@ class Account extends Eloquent Session::put(SESSION_DATE_FORMAT, $this->date_format ? $this->date_format->format : DEFAULT_DATE_FORMAT); Session::put(SESSION_DATE_PICKER_FORMAT, $this->date_format ? $this->date_format->picker_format : DEFAULT_DATE_PICKER_FORMAT); Session::put(SESSION_DATETIME_FORMAT, $this->datetime_format ? $this->datetime_format->format : DEFAULT_DATETIME_FORMAT); - Session::put(SESSION_CURRENCY, $this->currency_id ? $this->currency_id : DEFAULT_CURRENCY); + Session::put(SESSION_CURRENCY, $this->currency_id ? $this->currency_id : DEFAULT_CURRENCY); } public function getInvoiceLabels() diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png old mode 100644 new mode 100755