-
Notifications
You must be signed in to change notification settings - Fork 90
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
How to retrieve user(s) details using getUserBy* and getUsersBy* ? #21
Comments
hello @vaima75, for resolving your issue just provide access on retrieving users via API. For it go to your admin panel by path Admin panel -> Your app -> Users -> Setting and in the section 'PRIVACY AND SAFETY' tick needed checkboxes. |
Hi @TatankaConCube, I've enabled both of them but my issue isn't with the system but to convert Future CubeUser instances while I require CubeUser Instances from getUserBy* and getUsersBy* methods using createSession() [which itself is future instance]. |
In your demo, you are using "configs.dart" which has alias records from demo app database. For this app to work properly, I've to add user records in my app database and create an alias record [list user = [ CubeUser(), CubeUser(), .... ]] in "configs.dart". This file is used to create sessions to perform certain operations. My query is "how to get user data dynamically and perform those operations?". Every time I try to implement get* methods or when I create a session (app session not user) I don't know how to use that session to fetch user data as it shows 401 error. |
If possible, kindly provide implementation sample for reference. |
here is a simple example, how to create an empty session, then get the user by login, then create a session with this got user: createSession().then((value) {
return getUserByLogin("marvin188").then((userFromServer) {
userFromServer.password = "supersecurepwd";
return createSession(user).then((session) {
log(value.toString());
});
}).catchError((error) {
log(error.toString());
});
}); Now we are developing a simple Chat sample and it will contain sign up logic for using chat options. |
Hi @TatankaConCube, thanks for sharing the sample. I'm able to get the CubeUser and list of CubeUsers with get* methods. One small favor, how to display such values on Widget or access them through a variable. I tried one sample here 'vcinfo.dart'
Accessing the variable in main.dart
I tried the same with Id and Login get methods but the return value is null. |
Is it Holiday going!!! |
sorry @vaima75, but your latest questions not related to ConnectyCube API or SDK. Please search how to add items to flutter widgets on Flutter cookbook or other sources. |
@vaima75 happy to inform you, today we released our realization of a simple example of a Chatting app which demonstrates, how to use ConnectyCube Flutter SDK for the implementation chat functionality in your app. |
Specify the sample to which the issue belongs (use [x]):
[ x] P2P Call sample
Platform (use [x])
[x ] Android
[x ] iOS
I referred ur documentation on getUserBy* and getUsersBy* to retrieve user details for CCApp. But failed to retrieve values from it as it creates Future instances while I require CubeUser Instances from these methods.
Ur demo app works fine when static CubeUser List is called and not from the CCApp Database on realtime bases.
The text was updated successfully, but these errors were encountered: