registrar usuario de tipo comprador, comente algunas cosas del codigo
This commit is contained in:
@@ -69,29 +69,29 @@ class HomeController extends Controller
|
||||
return view('frontend.user_login');
|
||||
}
|
||||
|
||||
public function registration(Request $request)
|
||||
{
|
||||
if (Auth::check()) {
|
||||
return redirect()->route('home');
|
||||
}
|
||||
if ($request->has('referral_code') && addon_is_activated('affiliate_system')) {
|
||||
try {
|
||||
$affiliate_validation_time = AffiliateConfig::where('type', 'validation_time')->first();
|
||||
$cookie_minute = 30 * 24;
|
||||
if ($affiliate_validation_time) {
|
||||
$cookie_minute = $affiliate_validation_time->value * 60;
|
||||
}
|
||||
// public function registration(Request $request)
|
||||
// {
|
||||
// if (Auth::check()) {
|
||||
// return redirect()->route('home');
|
||||
// }
|
||||
// if ($request->has('referral_code') && addon_is_activated('affiliate_system')) {
|
||||
// try {
|
||||
// $affiliate_validation_time = AffiliateConfig::where('type', 'validation_time')->first();
|
||||
// $cookie_minute = 30 * 24;
|
||||
// if ($affiliate_validation_time) {
|
||||
// $cookie_minute = $affiliate_validation_time->value * 60;
|
||||
// }
|
||||
|
||||
Cookie::queue('referral_code', $request->referral_code, $cookie_minute);
|
||||
$referred_by_user = User::where('referral_code', $request->referral_code)->first();
|
||||
// Cookie::queue('referral_code', $request->referral_code, $cookie_minute);
|
||||
// $referred_by_user = User::where('referral_code', $request->referral_code)->first();
|
||||
|
||||
$affiliateController = new AffiliateController;
|
||||
$affiliateController->processAffiliateStats($referred_by_user->id, 1, 0, 0, 0);
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
return view('frontend.user_registration');
|
||||
}
|
||||
// $affiliateController = new AffiliateController;
|
||||
// $affiliateController->processAffiliateStats($referred_by_user->id, 1, 0, 0, 0);
|
||||
// } catch (\Exception $e) {
|
||||
// }
|
||||
// }
|
||||
// return view('frontend.user_registration');
|
||||
// }
|
||||
|
||||
public function cart_login(Request $request)
|
||||
{
|
||||
@@ -590,37 +590,37 @@ class HomeController extends Controller
|
||||
return back();
|
||||
}
|
||||
|
||||
public function send_email_change_verification_mail($request, $email)
|
||||
{
|
||||
$response['status'] = 0;
|
||||
$response['message'] = 'Unknown';
|
||||
// public function send_email_change_verification_mail($request, $email)
|
||||
// {
|
||||
// $response['status'] = 0;
|
||||
// $response['message'] = 'Unknown';
|
||||
|
||||
$verification_code = Str::random(32);
|
||||
// $verification_code = Str::random(32);
|
||||
|
||||
$array['subject'] = translate('Email Verification');
|
||||
$array['from'] = env('MAIL_FROM_ADDRESS');
|
||||
$array['content'] = translate('Verify your account');
|
||||
$array['link'] = route('email_change.callback') . '?new_email_verificiation_code=' . $verification_code . '&email=' . $email;
|
||||
$array['sender'] = Auth::user()->name;
|
||||
$array['details'] = translate("Email Second");
|
||||
// $array['subject'] = translate('Email Verification');
|
||||
// $array['from'] = env('MAIL_FROM_ADDRESS');
|
||||
// $array['content'] = translate('Verify your account');
|
||||
// $array['link'] = route('email_change.callback') . '?new_email_verificiation_code=' . $verification_code . '&email=' . $email;
|
||||
// $array['sender'] = Auth::user()->name;
|
||||
// $array['details'] = translate("Email Second");
|
||||
|
||||
$user = Auth::user();
|
||||
$user->new_email_verificiation_code = $verification_code;
|
||||
$user->save();
|
||||
// $user = Auth::user();
|
||||
// $user->new_email_verificiation_code = $verification_code;
|
||||
// $user->save();
|
||||
|
||||
try {
|
||||
Mail::to($email)->queue(new SecondEmailVerifyMailManager($array));
|
||||
// try {
|
||||
// Mail::to($email)->queue(new SecondEmailVerifyMailManager($array));
|
||||
|
||||
$response['status'] = 1;
|
||||
$response['message'] = translate("Your verification mail has been Sent to your email.");
|
||||
} catch (\Exception $e) {
|
||||
// return $e->getMessage();
|
||||
$response['status'] = 0;
|
||||
$response['message'] = $e->getMessage();
|
||||
}
|
||||
// $response['status'] = 1;
|
||||
// $response['message'] = translate("Your verification mail has been Sent to your email.");
|
||||
// } catch (\Exception $e) {
|
||||
// // return $e->getMessage();
|
||||
// $response['status'] = 0;
|
||||
// $response['message'] = $e->getMessage();
|
||||
// }
|
||||
|
||||
return $response;
|
||||
}
|
||||
// return $response;
|
||||
// }
|
||||
|
||||
public function email_change_callback(Request $request)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user