|
@@ -66,8 +66,8 @@ class User extends Api
|
|
|
*/
|
|
|
public function mobilelogin()
|
|
|
{
|
|
|
- $mobile = $this->request->request('mobile');
|
|
|
- $captcha = $this->request->request('captcha');
|
|
|
+ $mobile = input('mobile');
|
|
|
+ $captcha = input('captcha');
|
|
|
if (!$mobile || !$captcha) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
@@ -190,10 +190,10 @@ class User extends Api
|
|
|
*/
|
|
|
public function register()
|
|
|
{
|
|
|
- $username = $this->request->request('username');
|
|
|
- $password = $this->request->request('password');
|
|
|
- $mobile = $this->request->request('mobile');
|
|
|
- $code = $this->request->request('code');
|
|
|
+ $username = input('username');
|
|
|
+ $password = input('password');
|
|
|
+ $mobile = input('mobile');
|
|
|
+ $code = input('code');
|
|
|
if (!$username || !$password) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
@@ -307,8 +307,8 @@ class User extends Api
|
|
|
public function changemobile()
|
|
|
{
|
|
|
$user = $this->auth->getUser();
|
|
|
- $mobile = $this->request->request('mobile');
|
|
|
- $captcha = $this->request->request('captcha');
|
|
|
+ $mobile = input('mobile');
|
|
|
+ $captcha = input('captcha');
|
|
|
if (!$mobile || !$captcha) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
@@ -341,8 +341,8 @@ class User extends Api
|
|
|
public function third()
|
|
|
{
|
|
|
$url = url('user/index');
|
|
|
- $platform = $this->request->request("platform");
|
|
|
- $code = $this->request->request("code");
|
|
|
+ $platform = input("platform");
|
|
|
+ $code = input("code");
|
|
|
$config = get_addon_config('third');
|
|
|
if (!$config || !isset($config[$platform])) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
@@ -372,11 +372,11 @@ class User extends Api
|
|
|
*/
|
|
|
public function resetpwd()
|
|
|
{
|
|
|
- $type = $this->request->request("type");
|
|
|
- $mobile = $this->request->request("mobile");
|
|
|
- $email = $this->request->request("email");
|
|
|
- $newpassword = $this->request->request("newpassword");
|
|
|
- $captcha = $this->request->request("captcha");
|
|
|
+ $type = input("type");
|
|
|
+ $mobile = input("mobile");
|
|
|
+ $email = input("email");
|
|
|
+ $newpassword = input("newpassword");
|
|
|
+ $captcha = input("captcha");
|
|
|
if (!$newpassword || !$captcha) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
@@ -455,9 +455,9 @@ class User extends Api
|
|
|
$this->error($validate->getError());
|
|
|
}
|
|
|
|
|
|
- $mobile = $this->request->request("mobile");
|
|
|
- $newpassword = $this->request->request("password");
|
|
|
- $captcha = $this->request->request("captcha");
|
|
|
+ $mobile = input("mobile");
|
|
|
+ $newpassword = input("password");
|
|
|
+ $captcha = input("captcha");
|
|
|
|
|
|
$user = \app\common\model\User::getByMobile($mobile);
|
|
|
if (!$user) {
|