public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get the ID of users which do not have records in Identity Proof table "users".
     $newUsers = array();
     foreach ($this->items as $item) {
         if (!$item->user_id) {
             $newUsers[] = $item->id;
         }
     }
     // Create users if they do not exist.
     if (!empty($newUsers)) {
         $model = $this->getModel();
         $model->createUsers($newUsers);
     }
     // Add submenu
     IdentityProofHelper::addSubmenu($this->getName());
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Add submenu
     IdentityProofHelper::addSubmenu($this->getName());
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     $this->version = new IdentityProofVersion();
     // Load ITPrism library version
     jimport("itprism.version");
     if (!class_exists("ITPrismVersion")) {
         $this->itprismVersion = JText::_("COM_IDENTITYPROOF_ITPRISM_LIBRARY_DOWNLOAD");
     } else {
         $itprismVersion = new ITPrismVersion();
         $this->itprismVersion = $itprismVersion->getShortVersion();
     }
     // Get URI
     $this->uri = JUri::getInstance();
     $uriCloned = clone $this->uri;
     // Generate HTTPS URI.
     $uriCloned->setScheme("https");
     $this->uriHTTPS = $uriCloned->toString();
     // Add submenu
     IdentityProofHelper::addSubmenu($this->getName());
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }