Esempio n. 1
0
 $des = get_POST_var("des");
 $timezone = get_POST_var("Timezone");
 $fName = get_POST_var("fname");
 $lName = get_POST_var("lname");
 $eMail = get_POST_var("email");
 $msg = get_POST_var("msg");
 $invi_fName = $fName . ' ' . $lName;
 //$existingUserName = executesql_returnArray("select emplUsername from tblAppUsers where emplUsername='******'");;
 $MU = new ManageUsers();
 $MU->userId = $CURRENT_USERID;
 $existingUserName = $MU->checkFor_UserName_Existence($uName);
 if ($existingUserName) {
     send_Action_Response('Fail', 'Username already exists !');
     exit;
 }
 $existingEmail = $MU->checkFor_User_Email_Existence($eMail);
 if ($existingEmail) {
     send_Action_Response('Fail', 'Email already exists !');
     exit;
 }
 $user_id = $MU->insert_newUser($uName, $pwd, $eMail, $invi_fName, $mobile, $des, $timezone);
 $subject = "Your account has been created";
 $message = '<h2>Your account has been created.</h2><br/>';
 $message .= 'You\'re all set. You\'ll find your login details and a link to sign in below.<br/>';
 $message .= '<B>Your Username is:</B><br/>';
 $message .= $uName . '<br/><br/>';
 $message .= '<B>Your Password is:</B><br/>';
 $message .= $pwd . '<br/><br/>';
 $message .= 'Access your ' . APPNAME . ' account now:<br/>';
 $message .= '<a href="' . APPURL . '">' . APPURL . '</a><br/><br/>';
 $message .= '<b>' . $_SESSION["emplFullName"] . '</b> says:<br/>';