解决linux下文件名大小写的bug、完善用户中心
This commit is contained in:
54
app/controller/user/User.php
Normal file
54
app/controller/user/User.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\controller\user;
|
||||
|
||||
use app\model\Member;
|
||||
|
||||
/**
|
||||
* @title 用户管理
|
||||
*/
|
||||
class User extends Base {
|
||||
/**
|
||||
* @title 个人资料
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function profile() {
|
||||
if ($this->request->isPost()) {
|
||||
$reuslt = (new Member())->editUser($this->request, session('userInfo.uid'));
|
||||
if (false !== $reuslt) {
|
||||
return $this->success('修改成功!');
|
||||
} else {
|
||||
return $this->error('修改失败');
|
||||
}
|
||||
}else{
|
||||
$info = Member::find(session('userInfo.uid'));
|
||||
$this->data = [
|
||||
'info' => $info,
|
||||
'keyList' => Member::$useredit
|
||||
];
|
||||
return $this->fetch('user@/edit');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 重置密码
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function repasswd() {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 上传头像
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function avatar() {
|
||||
return $this->fetch();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user