1
This commit is contained in:
@@ -631,7 +631,7 @@ class User extends Base
|
||||
$this->user_obj->update($user_info);
|
||||
}else{//google
|
||||
if(isset($data['g_author'])&&$data['g_author']!=null&&$data['g_author']!=""){
|
||||
$this->googleBindAuthorNew($data['user_id'],$data['g_author']);
|
||||
$this->googleBindAuthorNew($data['user_id'],$data['g_author'],$editor_info['realname']);
|
||||
}else{
|
||||
$user_info['google_index'] = $data['index'];
|
||||
$user_info['google_time'] = time();
|
||||
@@ -639,7 +639,9 @@ class User extends Base
|
||||
$this->user_obj->update($user_info);
|
||||
}
|
||||
}
|
||||
return jsonSuccess($user_info);
|
||||
|
||||
$new_user = $this->user_obj->where("user_id",$user_info['user_id'])->find();
|
||||
return jsonSuccess($new_user);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1628,7 +1630,7 @@ class User extends Base
|
||||
return jsonSuccess($organic_results);
|
||||
}
|
||||
|
||||
private function googleBindAuthorNew($user_id,$g_author){
|
||||
private function googleBindAuthorNew($user_id,$g_author,$editor_name){
|
||||
$this->user_obj->where('user_id',$user_id)->update(['g_author'=>trim($g_author)]);
|
||||
//绑定完成后自动获取指数
|
||||
Loader::import("google.google-search-results");
|
||||
@@ -1647,6 +1649,7 @@ class User extends Base
|
||||
|
||||
$updata['google_index'] = $h_index;
|
||||
$updata['google_time'] = time();
|
||||
$updata['google_editor'] = $editor_name;
|
||||
$this->user_obj->where('user_id',$user_id)->update($updata);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user