Commit f4bb60fa authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 876c6b9b
......@@ -499,6 +499,8 @@ class tx_nG6_eid {
$email = trim(t3lib_div::_GP('email'));
$password = trim(t3lib_div::_GP('password'));
$cruser_id = trim(t3lib_div::_GP('creator'));
$clearpassword = trim(t3lib_div::_GP('clearpassword'));
$from_email = trim(t3lib_div::_GP('from_email'));
$pid = trim(t3lib_div::_GP('pid'));
tx_nG6_db::create_new_user($user_name, $first_name, $last_name, $email, $password, $cruser_id, $group_id, $pid);
......@@ -513,9 +515,10 @@ class tx_nG6_eid {
$message = str_replace("###USER_FIRST_NAME###", $first_name, $add_user_email);
$message = str_replace("###USER_LAST_NAME###", $last_name, $message);
$message = str_replace("###USER_LOGIN###", $user_name, $message);
$message = str_replace("###USER_PASSWORD###", $password, $message);
mail($email, $add_user_title, $message, "From: <genotoul@example.com>");
$message = str_replace("###USER_PASSWORD###", $clearpassword, $message);
$msg_table = explode('\n', $message);
$message = implode("\n", $msg_table);
mail($email, $add_user_title, $message, $from_email);
print '2';
// user exists in DB
......
No preview for this file type
......@@ -180,6 +180,7 @@ class tx_nG6_pi1 extends tslib_pibase {
$smarty->assign('login_user', $GLOBALS['TSFE']->loginUser);
$smarty->assign('user_id', $GLOBALS['TSFE']->fe_user->user['uid']);
$smarty->assign('data_folder', $this->conf["data"]);
$smarty->assign('from_email', $this->conf["FromEmail"]);
$smarty->assign('server_name', $this->conf["server_name"]);
$smarty->assign('project_ids', substr($project_ids,0,-1));
$smarty->assign('pid', $this->conf['userpidList']);
......
......@@ -28,7 +28,7 @@
<label index="delete_user_btn">Delete</label>
<label index="add_user_btn">Add</label>
<label index="add_user_title">NG6 account creation</label>
<label index="add_user_email">Dear ###USER_FIRST_NAME### ###USER_LAST_NAME###,\n Please find bellow your login/password required to log into the NG6 system (http://ng6.toulouse.inra.fr): \n - login: ###USER_LOGIN###, \n - password: ###USER_PASSWORD###.\n The NG6 team\n PS: this is an automatic e-mail message generated by the NG6 system. Please DO NOT RESPOND to this e-mail because the mail box is unattended.</label>
<label index="add_user_email">Dear ###USER_FIRST_NAME### ###USER_LAST_NAME###,\nPlease find bellow your login/password required to log into the NG6 system (http://ng6.toulouse.inra.fr): \n - login: ###USER_LOGIN###, \n - password: ###USER_PASSWORD###.\nThe NG6 team\nPS: this is an automatic e-mail message generated by the NG6 system. Please DO NOT RESPOND to this e-mail because the mail box is unattended.</label>
<label index="close_btn_label">Close</label>
<label index="user_login">Login : </label>
<label index="user_pwd">Password : </label>
......@@ -455,7 +455,7 @@
<label index="delete_user_btn">Supprimer</label>
<label index="add_user_btn">Ajouter</label>
<label index="add_user_title">Création de compte NG6</label>
<label index="add_user_email">###USER_FIRST_NAME### ###USER_LAST_NAME###,\n Veuillez trouver ci-joint votre login/mot de passe nécessaire afin de se loguer à NG6 (http://ng6.toulouse.inra.fr): \n - login: ###USER_LOGIN###, \n - mot de passe: ###USER_PASSWORD###.\n L'équipe NG6\n PS: ceci est un mail généré automatiquement par NG6. Veuillez ne repondez pas à cet e-mail.</label>
<label index="add_user_email">###USER_FIRST_NAME### ###USER_LAST_NAME###,\nVeuillez trouver ci-joint votre login/mot de passe nécessaire afin de se loguer à NG6 (http://ng6.toulouse.inra.fr): \n - login: ###USER_LOGIN###, \n - mot de passe: ###USER_PASSWORD###.\nL'équipe NG6\nPS: ceci est un mail généré automatiquement par NG6. Veuillez ne repondez pas à cet e-mail.</label>
<label index="close_btn_label">Fermer</label>
<label index="run_list">Liste des runs auxquels vous avez accès :</label>
<label index="project">Projet</label>
......
......@@ -51,6 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<input type="hidden" id="user_login" value="{$llang.user_login}" />
<input type="hidden" id="user_login" value="{$llang.user_login}" />
<input type="hidden" id="add_user_email" value="{$llang.add_user_email}" />
<input type="hidden" id="from_email" value="{$from_email}" />
<input type="hidden" id="add_user_title" value="{$llang.add_user_title}" />
<input type="hidden" id="user_id" value="{$user_id}" />
<input type="hidden" id="pid" value="{$pid}" />
......
......@@ -1102,14 +1102,16 @@ $(function () {
val_url += "&first_name=" + $("#first_name_val").val();
val_url += "&last_name=" + $("#last_name_val").val();
val_url += "&password=" + MD5($("#user_password_pwd_val").val());
val_url += "&clearpassword=" + $("#user_password_pwd_val").val();
val_url += "&email=" + $("#user_email_val").val();
val_url += "&creator=" + $("#user_id").val();
val_url += "&group=" + $("#user_group_val").val();
val_url += "&project_id=" + $("#current_project_id").val();
val_url += "&right=" + $("#cbb_user_right").val();
val_url += "&pid=" + $("#pid").val();
val_url += "&add_user_email=" + $("#add_user_email").val();
val_url += "&add_user_email=" + escape($("#add_user_email").val());
val_url += "&add_user_title=" + $("#add_user_title").val();
val_url += "&from_email=" + $("#from_email").val();
$.ajax({
url: val_url,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment