|
@@ -48,8 +48,8 @@ class User extends Api
|
|
|
*/
|
|
|
public function login()
|
|
|
{
|
|
|
- $account = $this->request->post('account');
|
|
|
- $password = $this->request->post('password');
|
|
|
+ $account = input('account');
|
|
|
+ $password = input('password');
|
|
|
if (!$account || !$password) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
@@ -71,8 +71,10 @@ class User extends Api
|
|
|
*/
|
|
|
public function mobilelogin()
|
|
|
{
|
|
|
- $mobile = $this->request->post('mobile');
|
|
|
- $captcha = $this->request->post('captcha');
|
|
|
+
|
|
|
+ $mobile = input('mobile');
|
|
|
+ $captcha = input('captcha');
|
|
|
+
|
|
|
if (!$mobile || !$captcha) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
@@ -433,12 +435,12 @@ class User extends Api
|
|
|
*/
|
|
|
public function resetpwd()
|
|
|
{
|
|
|
- //$type = $this->request->post("type");
|
|
|
+ //$type = input("type");
|
|
|
$type = 'mobile';
|
|
|
- $mobile = $this->request->post("mobile");
|
|
|
- $email = $this->request->post("email");
|
|
|
- $newpassword = $this->request->post("newpassword");
|
|
|
- $captcha = $this->request->post("captcha");
|
|
|
+ $mobile = input("mobile");
|
|
|
+ $email = input("email");
|
|
|
+ $newpassword = input("newpassword");
|
|
|
+ $captcha = input("captcha");
|
|
|
if (!$newpassword || !$captcha) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
@@ -487,8 +489,8 @@ class User extends Api
|
|
|
* @param string $oldpassword 旧密码
|
|
|
*/
|
|
|
public function changepwd(){
|
|
|
- $newpassword = input('post.newpassword');
|
|
|
- $oldpassword = input('post.oldpassword','');
|
|
|
+ $newpassword = input('newpassword');
|
|
|
+ $oldpassword = input('oldpassword','');
|
|
|
|
|
|
if (!$newpassword) {
|
|
|
$this->error(__('Invalid parameters'));
|