-
-
Notifications
You must be signed in to change notification settings - Fork 206
parseUser.currentUser() & .getCurrentUserFromServer() #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey,
There's a fix for this in release 1.0.4. That should be released shortly.
Still working on a fix for duplicates in 'getAll' api calls.
Thanks
…On Thu, 10 Jan 2019 at 13:15, ScanEat ***@***.***> wrote:
Hello,
I copy/paste the project example, put my applications constants.
I sign up a user and login it. (I have the user in database with the
session, it's good)
I restart my application and do my own code :
checkCurrentUser() async { // Best practice for starting the app. This
will check for a var user = ParseUser.currentUser(); user = await
user.getCurrentUserFromServer(); print("user: $user"); }
But in my terminal, I have this :
I/flutter (13889): I/flutter (13889): ---- I/flutter (13889): Hello
Flutter API Response (_User : ParseApiRQ.currentUser) : I/flutter (13889):
Status Code: 200 I/flutter (13889): Payload: {objectId: LjTOWTPE8D,
createdAt: 2019-01-10T12:51:19.140Z, email: ***@***.***,
username: TestFlutter, updatedAt: 2019-01-10T12:51:19.140Z, ACL: {*: {read:
true}, LjTOWTPE8D: {read: true, write: true}}, sessionToken:
r:5f7045a813f163282ac8a765eabf8cb6, __type: Object, className: _User}
I/flutter (13889): ---- I/flutter (13889): user: Username: null I/flutter
(13889): Email Address:null
The problem is that it seems that the user is retrieved but when I print
my user variable, it's null.
In advance, thank you.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#24>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHgn3rZKCv7AHPOgGlzXSGEsZovE-Itrks5vBzzYgaJpZM4Z5eX->
.
--
Kind Regards
Phill Wiggins
[email protected]
|
Should be fixed now. |
why ParseUser.currentUser() return Future? |
@ZeroNilZero If you have a case where using a future is not possible, you might have a lock at this. |
@maaeps |
I assume you have a custom ParseUser class as described here (but with extending ParseUser) class and want to get the current user as an instance of your custom class. You can use provide a |
@maaeps |
How can I add this version? |
Like this? To use 1.0.27 in your app (not released yet!)
|
Hello,
I copy/paste the project example, put my applications constants.
I sign up a user and login it. (I have the user in database with the session, it's good)
I restart my application and do my own code :
checkCurrentUser() async { // Best practice for starting the app. This will check for a var user = ParseUser.currentUser(); user = await user.getCurrentUserFromServer(); print("user: $user"); }
But in my terminal, I have this :
I/flutter (13889): I/flutter (13889): ---- I/flutter (13889): Hello Flutter API Response (_User : ParseApiRQ.currentUser) : I/flutter (13889): Status Code: 200 I/flutter (13889): Payload: {objectId: LjTOWTPE8D, createdAt: 2019-01-10T12:51:19.140Z, email: [email protected], username: TestFlutter, updatedAt: 2019-01-10T12:51:19.140Z, ACL: {*: {read: true}, LjTOWTPE8D: {read: true, write: true}}, sessionToken: r:5f7045a813f163282ac8a765eabf8cb6, __type: Object, className: _User} I/flutter (13889): ---- I/flutter (13889): user: Username: null I/flutter (13889): Email Address:null
The problem is that it seems that the user is retrieved but when I print my user variable, it's null.
In advance, thank you.
The text was updated successfully, but these errors were encountered: