From a32bd01d16b69d115451221c772e30434b1a9854 Mon Sep 17 00:00:00 2001 From: Juvenn Woo Date: Mon, 24 Jun 2019 17:19:06 +0800 Subject: [PATCH 1/3] (fix) signup or login by sms code --- src/LeanCloud/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LeanCloud/User.php b/src/LeanCloud/User.php index 8ceff5e..8dd378b 100644 --- a/src/LeanCloud/User.php +++ b/src/LeanCloud/User.php @@ -480,7 +480,7 @@ public static function signUpOrLoginByMobilePhone($phoneNumber, $smsCode) { )); $user = new static(); $user->mergeAfterFetch($resp); - User::saveCurrentUser($user); + static::saveCurrentUser($user); } /* From cae55999177af89105d1c39e256c99981f339e40 Mon Sep 17 00:00:00 2001 From: Juvenn Woo Date: Mon, 24 Jun 2019 18:00:48 +0800 Subject: [PATCH 2/3] Return user on signup or login by phone --- src/LeanCloud/User.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/LeanCloud/User.php b/src/LeanCloud/User.php index 8dd378b..1b6b9dd 100644 --- a/src/LeanCloud/User.php +++ b/src/LeanCloud/User.php @@ -481,6 +481,7 @@ public static function signUpOrLoginByMobilePhone($phoneNumber, $smsCode) { $user = new static(); $user->mergeAfterFetch($resp); static::saveCurrentUser($user); + return $user; } /* From 8bfa22ae8190e6a252462e3aacdb6b911c829af2 Mon Sep 17 00:00:00 2001 From: Juvenn Woo Date: Mon, 24 Jun 2019 18:01:20 +0800 Subject: [PATCH 3/3] Release v0.10.2 --- Changelog.md | 5 +++++ src/LeanCloud/Client.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 4a0c104..863b0ee 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,4 +1,9 @@ +0.10.2 发布日期:2019-06-24 +---- + +* 修复 signUpOrLoginByMobilePhone 登录问题 + 0.10.1 发布日期:2019-06-24 ---- diff --git a/src/LeanCloud/Client.php b/src/LeanCloud/Client.php index 9af6999..7e53a2b 100644 --- a/src/LeanCloud/Client.php +++ b/src/LeanCloud/Client.php @@ -24,7 +24,7 @@ class Client { /** * Client version */ - const VERSION = '0.10.1'; + const VERSION = '0.10.2'; /** * API Version string