Skip to content

How to use Users Search Dialog

Ayman Habeb edited this page Apr 13, 2020 · 6 revisions

Overview

Users search dialog accessible via the plugin SDK from the control side of the plugin which allows plugin developers to show user search dialog through the control side to allow the app owner to select users and then do some operation on these users.

buildfire.auth.showUsersSeachDialog({},(error, users)=>{ });

This builtin dialog helps you, to show a dialog in order to be used to select users.

arguments

  • options : object * This property will give the plugin developers the functionality for allowing changing users' search dialog options (to be extended later).

  • callback(errors,results) required : function will be invoked after the plugin users select the users and close the search dialog.

    • results: object
      • users (Array of users)
      • userIds (Array of user ids)
var callback=function(error,results){
//Check for errors
};

buildfire.auth.showUsersSeachDialog({},callback);


//the results in the case of the application user select users

{
  "users": [
    {
      "firstName": "Bob",
      "lastName": "Steve",
      "displayName": "Bob Steve",
      "username": "[email protected]",
      "isActive": true,
      "userProfile": {
        
      },
      "imageUrl": "imageUrl"
    },
    {
      "firstName": "Sara",
      "lastName": "Conor",
      "displayName": "Sarah Conor",
      "username": "[email protected]",
      "isActive": true,
      "userProfile": {
        
      },
      "imageUrl": "imageUrl"
    }
  ],
  "userIds": [
    "5dc0832959fda11018ffb5e8",
    "5dc0836c59fda11018ffb5ea"
  ]
}

Clone this wiki locally