fix: ldap登陆用户信息可修改

This commit is contained in:
gaoxiaolin.gao 2018-06-13 20:12:21 +08:00
parent 4c10a4ea78
commit 35c2e0200b
3 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,7 @@ import { connect } from 'react-redux'
@connect(state => {
return {
curUid: state.user.uid,
userType: state.user.type,
userType: state.user.type,
curRole: state.user.role
}
}, {
@ -67,6 +67,7 @@ class Profile extends Component {
getUserInfo = (id) => {
var _this = this;
const { curUid } = this.props;
axios.get('/api/user/find?id=' + id).then((res) => {
_this.setState({
userinfo: res.data.data,
@ -168,6 +169,7 @@ class Profile extends Component {
let _userinfo = this.state._userinfo;
let roles = { admin: '管理员', member: '会员' };
let userType = "";
console.log("userinfo", userinfo)
if (this.props.userType === "third") {
userType = false;
} else if (this.props.userType === "site") {

View File

@ -144,7 +144,7 @@ class userController extends baseController {
email: result.email,
add_time: result.add_time,
up_time: result.up_time,
type: 'site',
type: 'third',
study: result.study
}, 0, 'logout success...');
}

View File

@ -62,6 +62,7 @@ exports.ldapQuery = (username, password) => {
});
// 查询结束
search.on('end', () => {
if (users.length > 0) {
client.bind(users[0], password, (e) => {
if (e) {