public function postStepOne(Request $request, ThreeStep $threeStep, ThreeStepAdmin $threeStepAdmin, ThreeStepLog $three_step_log, ThreeStepUser $tSUser)
 {
     $three_step_log->ip_address = $request->getClientIp();
     $three_step_log->step = 'three step step one post entry';
     $three_step_log->save();
     $validation_rules = $threeStep->getValidationRules();
     $this->validate($request, $validation_rules);
     $arr_request = $threeStep->getRequestArray($request);
     $obj_ts_user = $tSUser->where('role_id', 1)->first();
     if (!($obj_ts_user == null)) {
         if (!Hash::check($arr_request['password'], $obj_ts_user->password)) {
             $errors = array('message' => 'Your credentials for this page could not be validated');
             $data = $threeStep->getDataArrayGetStepOne($obj_ts_user->hint, $arr_request['confidence_msg']);
             return view('three_step/step_one')->with('data', $data)->withErrors($errors);
         } else {
             $ts_bypass = $threeStepAdmin->getTSBypass();
             $ts_test = $threeStepAdmin->getTSTest();
             $threeStep->three_step_id = Hash::make((string) time());
             $threeStep->session_id = $request->session()->getId();
             $threeStep->save();
             if ($ts_bypass) {
                 $three_step_log->ip_address = $request->getClientIp();
                 $three_step_log->step = 'three step step two success';
                 $three_step_log->save();
                 Session::put('three_step_id_from_step_two', $threeStep->three_step_id);
                 return redirect('admin/home')->withInput();
             } else {
                 $three_step_url = $threeStep->prepareURL($threeStep->three_step_id);
                 $recipient = $obj_ts_user->email;
                 $data = $threeStep->getDataArrayEmail($arr_request['confidence_msg'], $three_step_url, $ts_test);
                 $mail_content = view('emails/three_step')->with('data', $data)->render();
                 $three_step_log->ip_address = $request->getClientIp();
                 $three_step_log->step = 'three step step one post mail sent';
                 $three_step_log->save();
                 return view('three_step/step_one_success')->with('data', $data);
                 // this is the laravel mail
                 // commented out as no credentials for mail server are available
                 // see function in user.php moldel for more info
                 /*
                  $user->sendMailResetPassword(
                  		$password_reset_url,
                  		$obj_user
                  );
                 */
                 // echo "line 103 reached<br>";
                 /*
                     			if ($threeStep->sendMailThreeStep(
                     					$mail_content,
                     					$recipient
                     				))
                     			{
                     				return view('three_step/step_one_success');
                     			}
                 */
             }
             // end else, if no bypass
         }
         //    	$data = $threeStep->getDataArray(
         //   			$arr_request['password']);
     }
     //    	return view('three_step/step_one_fail');
 }