Load user, using cu...
 
Notifications
Clear all

Load user, using custom data.

6 Posts
2 Users
0 Likes
814 Views
(@elmstrom)
Posts: 9
Active Member
Topic starter
 

Is it possible to load user no matter their online state? (I used example from:  https://www.skaredcreations.com/api/combu/v3/page_users.html as a starting point)

The code only works for a specific online state, I want it to load no matter the online state.
Maybe I am going around it totally wrong?

string licenseString = licenseInput1.text
SearchCustomData[] searchData = new SearchCustomData[] {
new SearchCustomData("LicenseNumber", eSearchOperator.Equals ,licenseString)
};

User.Load("", "", searchData, true, 1, 1, (User[] users, int resultsCount, int pagesCount) => {
Debug.Log("Loaded: " + users.Length);
});


 
Posted : 17/07/2019 7:55 pm
(@skaredcreations)
Posts: 804
Prominent Member Admin
 

You're passing true to isOnline parameter of Load method, if you don't want to filter the online status just pass false instead.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 18/07/2019 4:00 pm
(@elmstrom)
Posts: 9
Active Member
Topic starter
 

I misunderstood it then, I thought "isOnline == true" filters online users and "isOnline == false" would filter all offline users.

Thank you for clearing that up

 

 
Posted : 19/07/2019 8:08 am
(@elmstrom)
Posts: 9
Active Member
Topic starter
 

Another question, It seams that it only search users that has been logged in (at some point). So if i create a user in the web-interface, it will not show up in the search unless i get the client to authenticated the users first.

The first account in the screenshot shows in a search and the second does not. As soon as i get a client to login with the user, it does show up in the search.

https://ibb.co/p1Nq7hV

 

 
Posted : 01/08/2019 12:03 pm
(@skaredcreations)
Posts: 804
Prominent Member Admin
 
Posted by: @elmstrom

Another question, It seams that it only search users that has been logged in (at some point). So if i create a user in the web-interface, it will not show up in the search unless i get the client to authenticated the users first.

The first account in the screenshot shows in a search and the second does not. As soon as i get a client to login with the user, it does show up in the search.

https://ibb.co/p1Nq7hV

 

It's correct if you didn't associate the account to the App in the tab Apps, because the account registration (both from admin website and from Unity client) only creates the record in Account but doesn't associate it to any App until a successful login (a successful authentication creates the association Account-App if not already existing).

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 06/08/2019 10:41 am
(@elmstrom)
Posts: 9
Active Member
Topic starter
 

Thanks that helped a lot, would be nice if there was an default app option.

 
Posted : 06/08/2019 11:33 am
Share: