作者 开飞机的舒克

绑定学生之后更改用户昵称

... ... @@ -56,13 +56,13 @@ class Bind extends Api
'user_id' => $user['id'],
'updatetime' => time()
]);
if ($users['is_teach'] == 0){
$update['nickname'] = $res['name']."家长";
}
$update = [
'bind_study' => 1,
'updatetime' => time()
];
if ($users['is_teach'] == 0){
$update['nickname'] = $res['name']."家长";
}
\db('user')
->where('id', $user['id'])
->update($update);
... ... @@ -108,13 +108,13 @@ class Bind extends Api
'user_id' => $user['id'],
'updatetime' => time()
]);
if ($users['is_teach'] == 0){
$update['nickname'] = $res['name']."家长";
}
$update = [
'bind_study' => 1,
'updatetime' => time()
];
if ($users['is_teach'] == 0){
$update['nickname'] = $res['name']."家长";
}
\db('user')
->where('id', $user['id'])
->update($update);
... ...