register step
This commit is contained in:
parent
1ada368ed4
commit
f06d2d15a5
50 changed files with 748 additions and 276 deletions
|
|
@ -149,6 +149,7 @@ class WizardController extends Controller
|
|||
$rules = array(
|
||||
'accepted_data_protection' => 'required',
|
||||
'accepted_active' => 'required',
|
||||
'accepted_contract' => 'required'
|
||||
);
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
|
|
@ -162,12 +163,17 @@ class WizardController extends Controller
|
|||
return view('user.wizard.register', $data)->withErrors($validator);
|
||||
}
|
||||
$account = $user->account;
|
||||
if($account->accepted_contract === null){
|
||||
$account->accepted_contract = now();
|
||||
}
|
||||
if($account->data_protection === null){
|
||||
$account->data_protection = now();
|
||||
}
|
||||
$account->save();
|
||||
if($user->agreement === null){
|
||||
$user->agreement = now();
|
||||
}
|
||||
|
||||
$user->wizard = 1;
|
||||
$user->save();
|
||||
return redirect(route('wizard_register'));
|
||||
|
|
@ -254,6 +260,7 @@ class WizardController extends Controller
|
|||
if ($step == 4) {
|
||||
$user->wizard = 5;
|
||||
$user->release_account = now();
|
||||
UserHistory::create(['user_id' => $user->id, 'action'=>'release_account', 'status'=>0]);
|
||||
$user->save();
|
||||
|
||||
if($user->isTestMode()){
|
||||
|
|
@ -297,14 +304,16 @@ class WizardController extends Controller
|
|||
|
||||
}
|
||||
$account = $user->account;
|
||||
if($account->accepted_contract === null){
|
||||
$account->accepted_contract = now();
|
||||
}
|
||||
if($account->data_protection === null){
|
||||
$account->data_protection = now();
|
||||
}
|
||||
$account->save();
|
||||
if($user->agreement === null){
|
||||
$user->agreement = now();
|
||||
}
|
||||
$account->save();
|
||||
$user->agreement = now();
|
||||
$user->wizard = 11;
|
||||
$user->save();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue