mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-03-30 15:57:46 +02:00
Check if user exists before checking redirect
This commit is contained in:
parent
4dd8e4f038
commit
1f46b3a85d
1 changed files with 12 additions and 8 deletions
|
@ -46,6 +46,7 @@ class ArtistsController extends Controller
|
||||||
{
|
{
|
||||||
$user = User::whereSlug($slug)->first();
|
$user = User::whereSlug($slug)->first();
|
||||||
|
|
||||||
|
if ($user) {
|
||||||
if ($user->redirect_to) {
|
if ($user->redirect_to) {
|
||||||
$newUser = User::find($user->redirect_to);
|
$newUser = User::find($user->redirect_to);
|
||||||
|
|
||||||
|
@ -59,6 +60,9 @@ class ArtistsController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
return View::make('artists.profile');
|
return View::make('artists.profile');
|
||||||
|
} else {
|
||||||
|
App::abort('404');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getShortlink($id)
|
public function getShortlink($id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue