mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 05:14:30 -04:00
Check user signs up
This commit is contained in:
parent
254510f22e
commit
089201bdde
@ -392,6 +392,10 @@ class AccountController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function showUserDetails()
|
public function showUserDetails()
|
||||||
{
|
{
|
||||||
|
if (! auth()->user()->registered) {
|
||||||
|
return redirect('/')->withError(trans('texts.sign_up_to_save'));
|
||||||
|
}
|
||||||
|
|
||||||
$oauthLoginUrls = [];
|
$oauthLoginUrls = [];
|
||||||
foreach (AuthService::$providers as $provider) {
|
foreach (AuthService::$providers as $provider) {
|
||||||
$oauthLoginUrls[] = ['label' => $provider, 'url' => URL::to('/auth/'.strtolower($provider))];
|
$oauthLoginUrls[] = ['label' => $provider, 'url' => URL::to('/auth/'.strtolower($provider))];
|
||||||
|
@ -209,7 +209,7 @@ class LoginController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function getLogoutWrapper(Request $request)
|
public function getLogoutWrapper(Request $request)
|
||||||
{
|
{
|
||||||
if (auth()->check() && ! auth()->user()->registered) {
|
if (auth()->check() && ! auth()->user()->email && ! auth()->user()->registered) {
|
||||||
if (request()->force_logout) {
|
if (request()->force_logout) {
|
||||||
$account = auth()->user()->account;
|
$account = auth()->user()->account;
|
||||||
app('App\Ninja\Repositories\AccountRepository')->unlinkAccount($account);
|
app('App\Ninja\Repositories\AccountRepository')->unlinkAccount($account);
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
{!! Former::text('id_number') !!}
|
{!! Former::text('id_number') !!}
|
||||||
{!! Former::text('vat_number') !!}
|
{!! Former::text('vat_number') !!}
|
||||||
{!! Former::text('website') !!}
|
{!! Former::text('website') !!}
|
||||||
|
@if (auth()->user()->registered)
|
||||||
{!! Former::text('work_email') !!}
|
{!! Former::text('work_email') !!}
|
||||||
|
@endif
|
||||||
{!! Former::text('work_phone') !!}
|
{!! Former::text('work_phone') !!}
|
||||||
{!! Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) !!}
|
{!! Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) !!}
|
||||||
|
|
||||||
|
@ -38,8 +38,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
@foreach ($settings as $section)
|
@foreach ($settings as $section)
|
||||||
|
@if ($section != ACCOUNT_USER_DETAILS || auth()->user()->registered)
|
||||||
<a href="{{ URL::to("settings/{$section}") }}" class="list-group-item {{ $selected === $section ? 'selected' : '' }}"
|
<a href="{{ URL::to("settings/{$section}") }}" class="list-group-item {{ $selected === $section ? 'selected' : '' }}"
|
||||||
style="width:100%;text-align:left">{{ trans("texts.{$section}") }}</a>
|
style="width:100%;text-align:left">{{ trans("texts.{$section}") }}</a>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@if ($type === ADVANCED_SETTINGS && !Utils::isNinjaProd())
|
@if ($type === ADVANCED_SETTINGS && !Utils::isNinjaProd())
|
||||||
<a href="{{ URL::to("settings/system_settings") }}" class="list-group-item {{ $selected === 'system_settings' ? 'selected' : '' }}"
|
<a href="{{ URL::to("settings/system_settings") }}" class="list-group-item {{ $selected === 'system_settings' ? 'selected' : '' }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user