* code task #2404.

This commit is contained in:
wangyidong
2015-11-12 10:40:02 +08:00
parent 19a2e963ca
commit 086848c53e
7 changed files with 12 additions and 12 deletions

View File

@@ -87,7 +87,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
{
common::printIcon('user', 'unlock', "userID=$user->account", '', 'list', '', "hiddenwin");
}
if($user->bindRanzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin");
if($user->ranzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin");
?>
</td>
</tr>

View File

@@ -23,7 +23,7 @@ class ssoModel extends model
*/
public function getBindUser($user)
{
return $this->dao->select('*')->from(TABLE_USER)->where('bindRanzhi')->eq($user)->andWhere('deleted')->eq('0')->fetch();
return $this->dao->select('*')->from(TABLE_USER)->where('ranzhi')->eq($user)->andWhere('deleted')->eq('0')->fetch();
}
/**
@@ -52,8 +52,8 @@ class ssoModel extends model
$password = md5($data->bindPassword);
$user = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($data->bindUser)->andWhere('password')->eq($password)->andWhere('deleted')->eq('0')->fetch();
if(empty($user))die(js::alert($this->lang->sso->bindNoUser));
$user->bindRanzhi = $this->session->ssoData->account;
$this->dao->update(TABLE_USER)->set('bindRanzhi')->eq($user->bindRanzhi)->where('id')->eq($user->id)->exec();
$user->ranzhi = $this->session->ssoData->account;
$this->dao->update(TABLE_USER)->set('ranzhi')->eq($user->ranzhi)->where('id')->eq($user->id)->exec();
}
elseif($data->bindType == 'add')
{
@@ -73,7 +73,7 @@ class ssoModel extends model
$user->realname = $data->realname;
$user->gender = isset($data->gender) ? $data->gender : '';
$user->email = $data->email;
$user->bindRanzhi = $this->session->ssoData->account;
$user->ranzhi = $this->session->ssoData->account;
$this->dao->insert(TABLE_USER)->data($user)
->autoCheck()

View File

@@ -42,7 +42,7 @@ $lang->user->join = 'Join date';
$lang->user->visits = 'Visits';
$lang->user->ip = 'Last IP';
$lang->user->last = 'Last login';
$lang->user->bindRanzhi = 'Ranzhi account';
$lang->user->ranzhi = 'Ranzhi account';
$lang->user->status = 'Status';
$lang->user->ditto = 'Ditto';
$lang->user->originalPassword = 'Original password';

View File

@@ -42,7 +42,7 @@ $lang->user->join = '入职日期';
$lang->user->visits = '访问次数';
$lang->user->ip = '最后IP';
$lang->user->last = '最后登录';
$lang->user->bindRanzhi = '然之账号';
$lang->user->ranzhi = '然之账号';
$lang->user->status = '状态';
$lang->user->ditto = '同上';
$lang->user->originalPassword = '原密码';

View File

@@ -42,7 +42,7 @@ $lang->user->join = '入職時間';
$lang->user->visits = '訪問次數';
$lang->user->ip = '最後IP';
$lang->user->last = '最後登錄';
$lang->user->bindRanzhi = '然之賬號';
$lang->user->ranzhi = '然之賬號';
$lang->user->status = '狀態';
$lang->user->ditto = '同上';
$lang->user->originalPassword = '原密碼';

View File

@@ -790,7 +790,7 @@ class userModel extends model
*/
public function unbind($account)
{
$this->dao->update(TABLE_USER)->set('bindRanzhi')->eq('')->where('account')->eq($account)->exec();
$this->dao->update(TABLE_USER)->set('ranzhi')->eq('')->where('account')->eq($account)->exec();
}
/**

View File

@@ -126,10 +126,10 @@
<th><?php echo $lang->user->zipcode;?></th>
<td><?php echo $user->zipcode;?></td>
</tr>
<?php if($user->bindRanzhi):?>
<?php if($user->ranzhi):?>
<tr>
<th><?php echo $lang->user->bindRanzhi;?></th>
<td><?php echo $user->bindRanzhi;?></td>
<th><?php echo $lang->user->ranzhi;?></th>
<td><?php echo $user->ranzhi;?></td>
</tr>
<?php endif;?>
</table>