20201112
This commit is contained in:
@@ -54,9 +54,6 @@ class User extends Controller {
|
||||
return json(['code' => 0, 'userinfo' => $admin_info]);
|
||||
}
|
||||
} else {//用户登录
|
||||
// $where['account'] = $data['username'];
|
||||
// $where['password'] = md5($data['password']);
|
||||
// $user_info = $this->user_obj->where($where)->find();
|
||||
$user_info = $this->user_obj
|
||||
->where('account|email', $data['username'])
|
||||
->where('password', md5($data['password']))
|
||||
@@ -131,25 +128,10 @@ class User extends Controller {
|
||||
$tt .= "Username:$account<br>";
|
||||
$tt .= "Password:" . $data['password'] . '<br><br>';
|
||||
$tt .= "Many thanks<br>TMR Publishing Group";
|
||||
// $content = $tt . '<p>Username:' . $account . '<br>Password:' . $data['password'] . '</p>';
|
||||
sendEmail($email, 'Dear ' . $data['name'], 'TMR', $tt,);
|
||||
return json($inser_data);
|
||||
}
|
||||
|
||||
// public function tttt(){
|
||||
// echo 'dsss';
|
||||
// }
|
||||
//
|
||||
// public function mytestemail(){
|
||||
// $journal_info = $this->journal_obj->where('journal_id',22)->find();
|
||||
// //发送注册成功邮件
|
||||
// $tt = 'Hello,<br><br>';
|
||||
// $res = sendEmail('751475802@qq.com', 'Dear ' . $journal_info['title'], 'TMR', $tt,$journal_info['email'],$journal_info['epassword']);
|
||||
// echo '<pre>';
|
||||
// var_dump($res);
|
||||
// echo '</pre>';
|
||||
// die;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取验证码图片(用户注册)
|
||||
@@ -372,9 +354,10 @@ class User extends Controller {
|
||||
$res = $this->reviewer_to_journal_obj->insert($insert_rtj);
|
||||
//发送email
|
||||
$content = "Thank you for registering as a " . $journal_info['title'] . " reviewer<br/>"
|
||||
. "At present, you have passed our examination";
|
||||
. "At present, you have passed our examination<br/>";
|
||||
$content .= '<a href="https://submission.tmrjournals.com">Submission System</a><br>';
|
||||
$content .= '<p>username:' . $apply_info['name'] . '</p>';
|
||||
$content .= $has_res ? '' : '<p>password:123456qwe</p>';
|
||||
$content .= '<p>Original Password: 123456qwe</p>';//$has_res ? '' : '<p>password:123456qwe</p>';
|
||||
sendEmail($apply_info['email'], $journal_info['title'], $journal_info['title'], $content, $journal_info['email'], $journal_info['epassword']);
|
||||
$update_res = $this->user_reviewer_obj->where($where)->update(['state' => 1]);
|
||||
if ($res && $add_res && $addinfo_res && $update_res) {
|
||||
@@ -545,44 +528,9 @@ class User extends Controller {
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户为了绑定orcid
|
||||
*/
|
||||
// public function getUserForOrcid(){
|
||||
// $data = $this->request->post();
|
||||
// $url = 'https://orcid.org/oauth/token';
|
||||
// $param['client_id'] = "APP-PKF0BGRP6DWM6FUB";
|
||||
// $param['client_secret'] = "755a0e59-9282-44d0-afb4-ef9771942bab";
|
||||
// $param['grant_type'] = "authorization_code";
|
||||
// $param['code'] = $data['code'];
|
||||
// $param['redirect_uri'] = "https://www.tmrjournals.com";
|
||||
// $res = $this->myUrl($url, $param);
|
||||
// $res1 = json_decode($res);
|
||||
// $orcidID = $res1->orcid;
|
||||
// $update['orcid'] = $orcidID;
|
||||
// $update['orcid_code'] = $res;
|
||||
// $this->user_obj->where('account',$data['account'])->update($update);
|
||||
// return json(['code' => 0]);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 授权码转化成令牌,并存贮
|
||||
* object(stdClass)#31 (7) {
|
||||
["access_token"]=>
|
||||
string(36) "28924261-b2a9-4ed0-952c-e2647843d1ba"
|
||||
["token_type"]=>
|
||||
string(6) "bearer"
|
||||
["refresh_token"]=>
|
||||
string(36) "ef66ffc7-1004-4d10-abe4-bdede248af47"
|
||||
["expires_in"]=>
|
||||
int(631138518)
|
||||
["scope"]=>
|
||||
string(13) "/authenticate"
|
||||
["name"]=>
|
||||
string(8) "Nuoxi Pi"
|
||||
["orcid"]=>
|
||||
string(19) "0000-0003-3278-0964"
|
||||
}
|
||||
*/
|
||||
public function sq_to_lp(){
|
||||
$url = 'https://orcid.org/oauth/token';
|
||||
|
||||
Reference in New Issue
Block a user