fix bug when accessing skinlib without logging in
This commit is contained in:
parent
c6d0f9f6b7
commit
4b54b218d5
|
|
@ -39,7 +39,7 @@ class SkinlibController extends BaseController
|
||||||
} elseif ($filter == "user") {
|
} elseif ($filter == "user") {
|
||||||
$uid = isset($_GET['uid']) ? $_GET['uid'] : 0;
|
$uid = isset($_GET['uid']) ? $_GET['uid'] : 0;
|
||||||
|
|
||||||
if ($uid == $this->user->uid) {
|
if (!is_null($this->user) && $uid == $this->user->uid) {
|
||||||
// show private textures when show uploaded textures of current user
|
// show private textures when show uploaded textures of current user
|
||||||
$textures = Texture::where('uploader', $uid)->orderBy($sort_by, 'desc');
|
$textures = Texture::where('uploader', $uid)->orderBy($sort_by, 'desc');
|
||||||
$total_pages = ceil($textures->count() / 20);
|
$total_pages = ceil($textures->count() / 20);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user