Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
183cd847
Commit
183cd847
authored
Sep 11, 2012
by
Jerome Mariette
Browse files
send an email when a user is added to the system
parent
1804a0e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
ui/nG6/class.tx_nG6_eid.php
View file @
183cd847
...
...
@@ -476,7 +476,15 @@ class tx_nG6_eid {
$project_id
=
trim
(
t3lib_div
::
_GP
(
'project_id'
));
$right_id
=
trim
(
t3lib_div
::
_GP
(
'right'
));
$group_name
=
trim
(
t3lib_div
::
_GP
(
'group'
));
$email
=
trim
(
t3lib_div
::
_GP
(
'email'
));
$first_name
=
trim
(
t3lib_div
::
_GP
(
'first_name'
));
$last_name
=
trim
(
t3lib_div
::
_GP
(
'last_name'
));
$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'
));
// if group not exists, create group
$group_id
=
tx_nG6_db
::
get_group_id
(
$group_name
);
if
(
!
isset
(
$group_id
)
){
...
...
@@ -491,18 +499,10 @@ class tx_nG6_eid {
// if user not exists in DB
if
(
!
isset
(
$c_user_id
)){
$create_user_email
=
trim
(
t3lib_div
::
_GP
(
'create_user_email'
));
$create_user_title
=
trim
(
t3lib_div
::
_GP
(
'create_user_title'
));
$first_name
=
trim
(
t3lib_div
::
_GP
(
'first_name'
));
$last_name
=
trim
(
t3lib_div
::
_GP
(
'last_name'
));
$add_user_email
=
trim
(
t3lib_div
::
_GP
(
'add_user_email'
));
$add_user_title
=
trim
(
t3lib_div
::
_GP
(
'add_user_title'
));
$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
);
// find the new user id
...
...
@@ -532,6 +532,8 @@ class tx_nG6_eid {
// send an email to the user
if
(
$email
!=
""
)
{
$add_user_email
=
trim
(
t3lib_div
::
_GP
(
'add_user_email'
));
$add_user_title
=
trim
(
t3lib_div
::
_GP
(
'add_user_title'
));
$project
=
tx_nG6_db
::
select_project
(
$project_id
);
$message
=
str_replace
(
"###USER_FIRST_NAME###"
,
$first_name
,
$add_user_email
);
...
...
ui/nG6/res/js/tx_nG6_pi1.js
View file @
183cd847
...
...
@@ -1112,6 +1112,8 @@ $(function () {
val_url
+=
"
&pid=
"
+
$
(
"
#pid
"
).
val
();
val_url
+=
"
&add_user_email=
"
+
escape
(
$
(
"
#add_user_email
"
).
val
());
val_url
+=
"
&add_user_title=
"
+
$
(
"
#add_user_title
"
).
val
();
val_url
+=
"
&create_user_email=
"
+
escape
(
$
(
"
#create_user_email
"
).
val
());
val_url
+=
"
&create_user_title=
"
+
$
(
"
#create_user_title
"
).
val
();
val_url
+=
"
&from_email=
"
+
$
(
"
#from_email
"
).
val
();
$
.
ajax
({
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment