Now returning 404 on user page when user is blocked
This commit is contained in:
parent
269d6ef7d6
commit
2e5dde0f88
|
@ -91,9 +91,13 @@ class UserController extends Controller
|
|||
return abort(404);
|
||||
}
|
||||
|
||||
$userinfo = User::select('id', 'name', 'littlelink_name', 'littlelink_description', 'theme', 'role')->where('id', $id)->first();
|
||||
$userinfo = User::select('id', 'name', 'littlelink_name', 'littlelink_description', 'theme', 'role', 'block')->where('id', $id)->first();
|
||||
$information = User::select('name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->get();
|
||||
|
||||
if ($userinfo->block == 'yes') {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
$links = DB::table('links')->join('buttons', 'buttons.id', '=', 'links.button_id')->select('links.link', 'links.id', 'links.button_id', 'links.title', 'links.custom_css', 'links.custom_icon', 'buttons.name')->where('user_id', $id)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->get();
|
||||
|
||||
return view('littlelink', ['userinfo' => $userinfo, 'information' => $information, 'links' => $links, 'littlelink_name' => $littlelink_name]);
|
||||
|
|
Loading…
Reference in New Issue