Fixed query getting wrong user

This commit is contained in:
Josef Citrine 2017-09-20 22:32:15 +01:00
parent e844054643
commit fc305034f5

View file

@ -47,7 +47,7 @@ class ArtistsController extends Controller
$user = User::whereSlug($slug)->first(); $user = User::whereSlug($slug)->first();
if ($user->redirect_to) { if ($user->redirect_to) {
$newUser = User::find($user->redirect_to)->first(); $newUser = User::find($user->redirect_to);
if ($newUser) { if ($newUser) {
return Redirect::action('ArtistsController@getProfile', [$newUser->slug]); return Redirect::action('ArtistsController@getProfile', [$newUser->slug]);