Bug fixes

This commit is contained in:
Hillel Coren 2014-03-23 21:38:03 +02:00
parent db3a6abad3
commit b99427b05c
4 changed files with 6 additions and 6 deletions

View File

@ -500,7 +500,7 @@ class AccountController extends \BaseController {
} }
else else
{ {
$account = Account::findOrFail(Auth::user()->account_id); $account = Auth::user()->account;
$account->name = trim(Input::get('name')); $account->name = trim(Input::get('name'));
$account->work_email = trim(Input::get('work_email')); $account->work_email = trim(Input::get('work_email'));
$account->work_phone = trim(Input::get('work_phone')); $account->work_phone = trim(Input::get('work_phone'));

View File

@ -17,11 +17,11 @@ class UserEventHandler
public function onLogin() public function onLogin()
{ {
$account = Auth::user()->account; $account = Auth::user()->account;
$account->last_login = Carbon::now()->toDateTimeString(); $account->last_login = Carbon::now()->toDateTimeString();
$account->save(); $account->save();
Event::fire('user.refresh'); Event::fire('user.refresh');
} }
public function onRefresh() public function onRefresh()

View File

@ -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_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_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_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() public function getInvoiceLabels()

0
public/apple-touch-icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB