function login($data) { $user = $this->get_user_by_email($data['email']); if ($user && md5($_POST['password'])) { add_user_data(get_object_vars($user)); return TRUE; } return FALSE; }
$tpl->assign(array('TR_ADD_USER_PAGE_TITLE' => tr('VHCS - User/Add user'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id']))); /* * * static page messages. * */ gen_reseller_menu($tpl); gen_logged_from($tpl); $timestamp = time(); $genpas = substr(md5($timestamp), 0, 6); $tpl->assign(array('TR_ADD_USER' => tr('Add user'), 'TR_CORE_DATA' => tr('Core data'), 'TR_USERNAME' => tr('Username'), 'TR_PASSWORD' => tr('Password'), 'TR_REP_PASSWORD' => tr('Password(repeat)'), 'TR_DMN_IP' => tr('Domain IP'), 'TR_USREMAIL' => tr('Email'), 'TR_ADDITIONAL_DATA' => tr('Additional data'), 'TR_CUSTOMER_ID' => tr('Customer ID'), 'TR_FIRSTNAME' => tr('First name'), 'TR_LASTNAME' => tr('Last name'), 'TR_COMPANY' => tr('Company'), 'TR_POST_CODE' => tr('Zip/Postal code'), 'TR_CITY' => tr('City'), 'TR_COUNTRY' => tr('Country'), 'TR_STREET1' => tr('Street 1'), 'TR_STREET2' => tr('Street 2'), 'TR_MAIL' => tr('Email'), 'TR_PHONE' => tr('Phone'), 'TR_FAX' => tr('Fax'), 'TR_BTN_ADD_USER' => tr('Add user'), 'TR_ADD_ALIASES' => tr('Add other domains to this account'), 'VL_USR_PASS' => $genpas, 'VL_USR_PASS_REP' => $genpas)); init_in_values(); // Process the action ... if (isset($_POST['uaction']) && "rau3_nxt" === $_POST['uaction'] && !isset($_SESSION['step_two_data'])) { if (check_ruser_data($tpl, '_no_')) { add_user_data($_SESSION['user_id']); } } else { unset($_SESSION['step_two_data']); gen_empty_data(); $tpl->assign('MESSAGE', ""); } gen_au3_page($tpl); gen_page_message($tpl); $tpl->parse('PAGE', 'page'); $tpl->prnt(); if (isset($cfg['DUMP_GUI_DEBUG'])) { dump_gui_debug(); } //unset_messages(); //