Manual approval or rejection of user registration request by Admin

1,037 views
Skip to first unread message

muhammadasi...@gmail.com

unread,
Nov 3, 2017, 5:23:14 PM11/3/17
to Firebase Google Group


I made an app in swift 3 where registration request from user is manually approved or rejected by the admin. Is there a way that whenever a new user registers, me as an admin can get some kind of notification like an email etc.

When a user sends a registration request, all user info is stored in firebase with “UsersStatus” attribute to be zero which means user is not approved. Admin has to manually change “UserStatus” to 1 which means that registration request from user is now approved. But Admin has to manually check every user which is not an efficient approach. Is there any possibility where I can search the users with “UserStatus” attribute 0 so that I don’t have to check each user. I tried Looking into Admin SDK of firebase but it looks like that as of now for swift admin SDK is not available. I have attached a image which contains the structure that I have in my app. Thanks in advance for any suggestions

Bildschirmfoto 2017-11-03 um 09.27.01.png

Hiranya Jayathilaka

unread,
Nov 3, 2017, 6:27:25 PM11/3/17
to fireba...@googlegroups.com
I think you're looking for something like https://firebase.google.com/docs/auth/extend-with-functions#trigger_a_function_on_user_creation

It seems you're actually storing user accounts in Firebase database. In that case you will probably have to use a database trigger: https://firebase.google.com/docs/functions/database-events

Functions provide a simple and powerful way to implement this type of reactive use cases.

On Fri, Nov 3, 2017 at 2:18 AM, <muhammadasi...@gmail.com> wrote:


I made an app in swift 3 where registration request from user is manually approved or rejected by the admin. Is there a way that whenever a new user registers, me as an admin can get some kind of notification like an email etc.

When a user sends a registration request, all user info is stored in firebase with “UsersStatus” attribute to be zero which means user is not approved. Admin has to manually change “UserStatus” to 1 which means that registration request from user is now approved. But Admin has to manually check every user which is not an efficient approach. Is there any possibility where I can search the users with “UserStatus” attribute 0 so that I don’t have to check each user. I tried Looking into Admin SDK of firebase but it looks like that as of now for swift admin SDK is not available. I have attached a image which contains the structure that I have in my app. Thanks in advance for any suggestions

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/265207e9-18b9-43ef-a91b-3bf5c1d36882%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Hiranya Jayathilaka | Software Engineer | h...@google.com | 650-203-0128

Reply all
Reply to author
Forward
0 new messages