|
@@ -245,6 +245,9 @@ class UserController extends Controller
|
|
*/
|
|
*/
|
|
public function destroy()
|
|
public function destroy()
|
|
{
|
|
{
|
|
|
|
+ if ($this->_user == Request::get('id')) {
|
|
|
|
+ return $this->showWarning("不可删除当前账号");
|
|
|
|
+ }
|
|
$user = AdminUserModel::find(Request::get('id'));
|
|
$user = AdminUserModel::find(Request::get('id'));
|
|
$ok = $user->delete();
|
|
$ok = $user->delete();
|
|
if ($ok) {
|
|
if ($ok) {
|