function form($t_user = "")
 {
     if ($vs_last_page = $this->request->getParameter("site_last_page", pString)) {
         # --- last_page is passed as "Sets" if was trying to add an image to set, "Bookmarks" if user was trying to bookmark an item
         $this->request->session->setVar('site_last_page', $vs_last_page);
         $this->request->session->setVar('site_last_page_object_id', $this->request->getParameter("object_id", pInteger));
         $this->request->session->setVar('site_last_page_row_id', $this->request->getParameter("row_id", pInteger));
         $this->request->session->setVar('site_last_page_tablename', $this->request->getParameter("tablename", pString));
     }
     if (!is_object($t_user)) {
         $t_user = new ca_users();
     }
     $this->view->setVar("fname", $t_user->htmlFormElement("fname", "<div><b>" . _t("First name") . "</b><br/>^ELEMENT</div>"));
     $this->view->setVar("lname", $t_user->htmlFormElement("lname", "<div><b>" . _t("Last name") . "</b><br/>^ELEMENT</div>"));
     $this->view->setVar("email", $t_user->htmlFormElement("email", "<div><b>" . _t("Email address") . "</b><br/>^ELEMENT</div>"));
     $this->view->setVar("password", $t_user->htmlFormElement("password", "<div><b>" . _t("Password") . "</b><br/>^ELEMENT</div>", array('value' => '')));
     $va_profile_prefs = $t_user->getValidPreferences('profile');
     if (is_array($va_profile_prefs) && sizeof($va_profile_prefs)) {
         $va_elements = array();
         foreach ($va_profile_prefs as $vs_pref) {
             $va_pref_info = $t_user->getPreferenceInfo($vs_pref);
             $va_elements[$vs_pref] = array('element' => $t_user->preferenceHtmlFormElement($vs_pref), 'formatted_element' => $t_user->preferenceHtmlFormElement($vs_pref, "<div><b>" . $va_pref_info['label'] . "</b><br/>^ELEMENT</div>"), 'info' => $va_pref_info, 'label' => $va_pref_info['label']);
         }
         $this->view->setVar("profile_settings", $va_elements);
     }
     $this->render('LoginReg/loginreg_html.php');
 }