How to filter Quickblox users?

2019-02-28 20:57发布

问题:

I want to filter my application users based on their phone number or email, but I don't want exact match, instead part of the email or part of the number users should return in response. Is there a way in Quickblox iOS SDK?

Suppose, I've some quickblox users like below :

 ID NAME      Email Address             Mobile Number
  1. User1 | yuyuqabc@somedomain.com | +91-12345-67890

  2. User2 | qerqrorp@somedomain.com | +1-123-000-7891

  3. User3 | xyzabcqry@somedomain.com | +64-123-456-78

Now the filter should apply like this,

if I want to query on email, which contains "abc" then should return 1st and 3rd user.

if I want to query on phone number, which contains "23" then should return all users.

if I want to query on phone number, which contains "234" then should return 1st and 3rd user.

Is it possible?

回答1:

It is possible only if you will use CustomObjects module instead of Users. So you will need to create User class in CustomObjects and you will have all operators working there.

In Users it is impossible.



标签: ios quickblox