fix using email in session

This commit is contained in:
printempw 2016-08-17 13:11:48 +08:00
parent 0e5d18c0a1
commit b137b88952
4 changed files with 5 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* @Author: printempw
* @Date: 2016-07-19 10:46:38
* @Last Modified by: printempw
* @Last Modified time: 2016-08-14 13:20:38
* @Last Modified time: 2016-08-17 13:07:08
*/
'use strict';
@ -306,8 +306,7 @@ function deleteTexture(tid) {
type: 'success',
html: json.msg
}).then(function() {
toastr.info('正在跳转...');
window.setTimeout('window.location = "./', 1000);
window.location = "./";
});
} else {
swal({

View File

@ -19,7 +19,7 @@
<style>{!! Option::get('custom_css') !!}</style>
</head>
<?php $user = new App\Models\User(0, ['email' => $_SESSION['email']]); ?>
<?php $user = new App\Models\User($_SESSION['uid']); ?>
<body class="hold-transition {{ Option::get('color_scheme') }} sidebar-mini">
<div class="wrapper">

View File

@ -26,7 +26,7 @@
</h1>
</section>
<?php $current_user = new App\Models\User(0, ['email' => $_SESSION['email']]); ?>
<?php $current_user = new App\Models\User($_SESSION['uid']); ?>
<!-- Main content -->
<section class="content">

View File

@ -9,7 +9,7 @@
</p>
@if (isset($_SESSION['email']))
@if (isset($_SESSION['uid']))
@if ($user->closet->has($texture['tid']))
<a title="从衣柜中移除" class="more like liked" tid="{{ $texture['tid'] }}" href="javascript:removeFromCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>