#cpp#ifndef COMMUNITY if (G_VERSIONTYPE != 'standard') { #cpp#ifndef STANDARD $versionUsers = (int) $GLOBALS['configuration']['version_users']; if ($users[0]['count'] >= $versionUsers && $versionUsers > 0) { eF_redirect(basename($_SERVER['PHP_SELF']) . "?ctg=contact&limit_reached=1&message=" . urlencode(_MAXIMUMUSERSLIMITREACHEDCONTACTUS) . "&message_type=failure"); } } #cpp#endif } #cpp#endif $smarty->assign("T_CTG", "signup"); // SMS: 7/23/2014 Changed to support vLab // $form = new HTML_QuickForm("signup_register_personal_form", "post", basename($_SERVER['PHP_SELF'])."?ctg=signup".(isset($_GET['ldap']) ? '&ldap=1' : ''), "", "class = 'indexForm'", true); $form = new HTML_QuickForm_vLab("signup_register_personal_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=signup" . (isset($_GET['ldap']) ? '&ldap=1' : ''), "", "class = 'indexForm'", true); $form->setIsSignupForm(true); $form->setIsProfileForm(false); // SMS End Change $form->removeAttribute('name'); // SMS: 7/23/2014 Changed to support vLab // $form -> registerRule('checkParameter', 'callback', 'eF_checkParameter'); //Register this rule for checking user input with our function, eF_checkParameter $form->registerRule('checkParameter', 'callback', 'eF_checkParameter_vLab'); //Register this rule for checking user input with our function, eF_checkParameter_vLab $form->registerRule('checkNotExist', 'callback', 'eF_checkNotExist'); //This rule is using our function, eF_checkNotExist, to ensure that no duplicate values are inserted in unique fields, such as login and email $form->registerRule('checkRule', 'callback', 'eF_checkRule'); //Register this rule for checking user input with our function, eF_checkParameter $form->addElement('text', 'login', _LOGIN, isset($_GET['ldap']) ? 'class = "inputText inactiveElement" readonly' : 'class = "inputText"'); $form->addRule('login', _THEFIELD . ' ' . _LOGIN . ' ' . _ISMANDATORY, 'required', null, 'client'); $form->addRule('login', _THEFIELD . ' "' . _LOGIN . '" ' . _MUSTBESMALLERTHAN . ' 50 ' . mb_strtolower(_CHARACTERS), 'maxlength', 50, 'client'); $form->addRule('login', _THEFIELD . ' ' . _LOGIN . ' ' . _HASINVALIDCHARACTERS . '. ' . _ONLYALLOWEDCHARACTERSLOGIN, 'checkParameter', 'login');
$vLabDisabledState = array('KaseyaPublic', 'Instructors', 'DemoFree', 'KaseyaQuickStart', 'Sales', 'Trial', 'Administrator', 'Student'); $rolesPlain = EfrontUser::getRoles(true); $valueOfLabSuspend = array_search("LabSuspend", $rolesPlain); $curUserTypeThatCantTransitToLabSuspend = $vLabDisabledState; $form->setValueOfInvalidUserType(-1); if (isset($_GET['add_user'])) { $form->setIsAddUser(true); $form->setValueOfInvalidUserType($valueOfLabSuspend); } else { $form->setIsAddUser(false); $curUserTypeID = $editedUser->user['user_types_ID']; if (in_array($rolesPlain[$curUserTypeID], $curUserTypeThatCantTransitToLabSuspend)) { $form->setValueOfInvalidUserType($valueOfLabSuspend); } } $form->setIsSignupForm(false); $form->setIsProfileForm(true); // End Add by Masoud $form->setMaxFileSize(FileSystemTree::getUploadMaxSize() * 1024); //getUploadMaxSize returns size in KB if (G_VERSIONTYPE != 'community') { #cpp#ifndef COMMUNITY //Add custom fields, defined in user_profile database table if ($currentUser->user['login'] == $editedUser->user['login']) { if (isset($_GET['add_user'])) { $userProfile = eF_getTableData("user_profile", "*", "active=1 AND type <> 'branchinfo' AND type <> 'groupinfo'", "field_order"); //Get admin-defined form fields for user registration } else { $userProfile = eF_getTableData("user_profile", "*", "active=1 and visible=1 AND type <> 'branchinfo' AND type <> 'groupinfo'", "field_order"); //Get admin-defined form fields for user registration }