     }
     
     
+    
     func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         
         let uid = FIRAuth.auth()!.currentUser!.uid

        retrieveUsers()
        
        open.target = self.revealViewController()
        open.action = Selector("revealToggle:")
        
        self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
        searchBar.delegate = self
        //filteredUser = userMessages
        
    }

                    if array.count == 0 {
                        return
                    }
                    // something wrong?
                    if array.count > indexPath.row && value as? String == array[indexPath.row].uid {
                        self.tableview.cellForRow(at: indexPath)?.accessoryType = .checkmark
                    }
                }
