forked from mirror/pixelfed
Merge pull request #4718 from pixelfed/staging
Update ApiV1Dot1Controller, add domain to iar redirect
This commit is contained in:
commit
81db60df32
|
@ -543,10 +543,10 @@ class ApiV1Dot1Controller extends Controller
|
||||||
$user->password = Hash::make($password);
|
$user->password = Hash::make($password);
|
||||||
$user->register_source = 'app';
|
$user->register_source = 'app';
|
||||||
$user->app_register_ip = $request->ip();
|
$user->app_register_ip = $request->ip();
|
||||||
$user->app_register_token = Str::random(32);
|
$user->app_register_token = Str::random(40);
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
$rtoken = Str::random(mt_rand(64, 70));
|
$rtoken = Str::random(64);
|
||||||
|
|
||||||
$verify = new EmailVerification();
|
$verify = new EmailVerification();
|
||||||
$verify->user_id = $user->id;
|
$verify->user_id = $user->id;
|
||||||
|
@ -570,12 +570,9 @@ class ApiV1Dot1Controller extends Controller
|
||||||
'ut' => 'required',
|
'ut' => 'required',
|
||||||
'rt' => 'required'
|
'rt' => 'required'
|
||||||
]);
|
]);
|
||||||
if(config('pixelfed.bouncer.cloud_ips.ban_signups')) {
|
|
||||||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
|
||||||
}
|
|
||||||
$ut = $request->input('ut');
|
$ut = $request->input('ut');
|
||||||
$rt = $request->input('rt');
|
$rt = $request->input('rt');
|
||||||
$url = 'pixelfed://confirm-account/'. $ut . '?rt=' . $rt;
|
$url = 'pixelfed://confirm-account/'. $ut . '?rt=' . $rt . '&domain=' . config('pixelfed.domain.app');
|
||||||
return redirect()->away($url);
|
return redirect()->away($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue