1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 06:32:40 +01:00

Fix for saving client portal setting in self host

This commit is contained in:
Hillel Coren 2016-05-12 20:29:33 +03:00
parent d72b54bb61
commit 2933ec97ca

View File

@ -708,6 +708,13 @@ class AccountController extends BaseController
private function saveClientPortal()
{
$account = Auth::user()->account;
$account->enable_client_portal = !!Input::get('enable_client_portal');
$account->enable_client_portal_dashboard = !!Input::get('enable_client_portal_dashboard');
$account->enable_portal_password = !!Input::get('enable_portal_password');
$account->send_portal_password = !!Input::get('send_portal_password');
// Only allowed for pro Invoice Ninja users or white labeled self-hosted users
if (Auth::user()->account->hasFeature(FEATURE_CLIENT_PORTAL_CSS)) {
$input_css = Input::get('client_view_css');
@ -742,18 +749,12 @@ class AccountController extends BaseController
$sanitized_css = $input_css;
}
$account = Auth::user()->account;
$account->client_view_css = $sanitized_css;
$account->enable_client_portal = !!Input::get('enable_client_portal');
$account->enable_client_portal_dashboard = !!Input::get('enable_client_portal_dashboard');
$account->enable_portal_password = !!Input::get('enable_portal_password');
$account->send_portal_password = !!Input::get('send_portal_password');
}
$account->save();
Session::flash('message', trans('texts.updated_settings'));
}
return Redirect::to('settings/'.ACCOUNT_CLIENT_PORTAL);
}