Gossamer Forum
Home : Products : Gossamer Links : Discussions :

E-Mail Admin on User Registration

Quote Reply
E-Mail Admin on User Registration
I would like to be notified anytime a new user registers for our site. Is there a simple way to do this? Sort of like how we are notified on links additions and review additions.
Quote Reply
Re: [Jobu] E-Mail Admin on User Registration In reply to
You can use GCommunity - there is an option to notify admin on user signup.
Quote Reply
Re: [Jobu] E-Mail Admin on User Registration In reply to
Yes, you can do a POST hook on 'add_user'.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [Payooo] E-Mail Admin on User Registration In reply to
In Reply To:
You can use GCommunity - there is an option to notify admin on user signup.


What is GCommunity and how do I get it? Is it free?
Quote Reply
Re: [fuzzy logic] E-Mail Admin on User Registration In reply to
In Reply To:
Yes, you can do a POST hook on 'add_user'.

Hi Philip,

Thanks for the reply. Are you able to be a bit more specific, i.e., where I change code and what I insert?

Thanks.
Quote Reply
Re: [Jobu] E-Mail Admin on User Registration In reply to
In Reply To:
In Reply To:
You can use GCommunity - there is an option to notify admin on user signup.



What is GCommunity and how do I get it? Is it free?

Info - http://www.gossamer-threads.com/.../community/index.htm

Yup! It's free.
Quote Reply
Re: [Payooo] E-Mail Admin on User Registration In reply to
In Reply To:
In Reply To:
In Reply To:
You can use GCommunity - there is an option to notify admin on user signup.




What is GCommunity and how do I get it? Is it free?


Info - http://www.gossamer-threads.com/.../community/index.htm

Yup! It's free.


Thanks, Payoo. This seems a bit overkill, though, for my intention, which is just to send us an e-mail notification when a new User signs up. We only use Links and don't anticipate using any of the other software, so we are satisfied with the standalone program. I just need to know which script to go in and edit and which code to add. I imagine it is relatively simple?

Thanks all!
Quote Reply
Re: [Jobu] E-Mail Admin on User Registration In reply to
I've attached a plugin for you. It was just a quickie to get you started. Modify the template file "new_user.eml" to customize the email (this installs into the admin template directory, NOT luna), and edit post_add_user() in NewUserEmail.pm if you want to do any additional post-processing.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] E-Mail Admin on User Registration In reply to
In Reply To:
I've attached a plugin for you. It was just a quickie to get you started. Modify the template file "new_user.eml" to customize the email (this installs into the admin template directory, NOT luna), and edit post_add_user() in NewUserEmail.pm if you want to do any additional post-processing.

Wow great. Thanks, I will install and test when I get home. Much appreciated.
Quote Reply
Re: [fuzzy logic] E-Mail Admin on User Registration In reply to
In Reply To:
I've attached a plugin for you. It was just a quickie to get you started. Modify the template file "new_user.eml" to customize the email (this installs into the admin template directory, NOT luna), and edit post_add_user() in NewUserEmail.pm if you want to do any additional post-processing.


Hey Philip,

This plugin works great functionality-wise -- we are always e-mailed on new user registrations. However, quick question on the foramtting of the email.

The new_user.eml template has only the following:


Code:

<%DUMP $u%>

Sincerely,

Links Manager


However, what is returned is:

Code:
<font face="Tahoma,Arial,Helvetica" size="2">Dumped value of 'u':
</font><pre>{
'Email' =>
'email',
'Password' => 'pw',
'Username' => 'user'
};
</pre>

Sincerely,

Links Manager


Is there a way to edit the dump value so that it does not include the HTML, etc.?

Thanks.
Quote Reply
Re: [Jobu] E-Mail Admin on User Registration In reply to
Yes, simple don't use <%DUMP $u%>. I used that so that you can see the variables available to you. Instead, you can retrieve any of the three values like such:

<%u.Username%>
<%u.Email%>
<%u.Password%>

or, I suppose if you really want a real dump without the HTML, I think you can use:

<%Data::Dumper::Dumper($u)%>

which will use the standard Data::Dumper module, instead of Links'.

Philip
------------------
Limecat is not pleased.

Last edited by:

fuzzy logic: Jul 21, 2006, 2:14 PM
Quote Reply
Re: [fuzzy logic] E-Mail Admin on User Registration In reply to
Hi Just a quick question

I dont have links 3 installed yet. What would be needed to make this compatible with version 2.1.1?

I updated line 18 :

use Links qw/objects/;


to

use Links qw/$CFG $IN $DB/;

but no joy?
Quote Reply
Re: [sam123] E-Mail Admin on User Registration In reply to
What kind of errors do you get? Does it just not send the email?

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] E-Mail Admin on User Registration In reply to
hi

Yes no errors - it just doesnt send mail
Quote Reply
Re: [sam123] E-Mail Admin on User Registration In reply to
I'll see what I can figure out. I don't currently have that version of Links installed so I'll have to set it up first to debug it. Give me a few days and I'll back with you with a fix. (I'm very busy working on other plugins...)

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] E-Mail Admin on User Registration In reply to
Hello,

I installed your script on version 2.1.1 and it gives an error message.

----------------------
A fatal error has occured:
Undefined subroutine &Links::send_email called at /home/mysite/link/admin/Plugins/NewUserEmail.pm line 40.
Please enable debugging in setup for more details.
Stack Trace
======================================
Links (32686): Links::environment called at /home/mysite/link/admin/Links.pm line 521 with no arguments.
Links (32686): Links::fatal called at /home/mysite/link/admin/Plugins/NewUserEmail.pm line 40 with arguments
(Undefined subroutine &Links::send_email called at /home/mysite/link/admin/Plugins/NewUserEmail.pm line 40.
).
Links (32686): Plugins::NewUserEmail::post_add_user called at /home/mysite/link/admin/GT/Plugins.pm line 153 with arguments
(1).
Links (32686): GT::Plugins::dispatch called at /home/mysite/link/admin/Links/Table/Users.pm line 44 with arguments
(GT::Plugins, /home/mysite/link/admin/Plugins, add_user, CODE(0x85e2ec4), HASH(0x85e27a4)).
Links (32686): Links::Table::Users::add called at /home/mysite/link/admin/Links/User/Login.pm line 162 with arguments
(Links::Table::Users=HASH(0x8460258), HASH(0x85e27a4)).
Links (32686): Links::User::Login::signup_user called at /home/mysite/link/admin/GT/Plugins.pm line 142 with no arguments.
Links (32686): GT::Plugins::dispatch called at /home/mysite/link/admin/Links/User/Login.pm line 25 with arguments
(GT::Plugins, /home/mysite/link/admin/Plugins, user_signup, CODE(0x83408c0)).
Links (32686): Links::User::Login::handle called at /home/mysite/link/admin/GT/Plugins.pm line 142 with no arguments.
Links (32686): GT::Plugins::dispatch called at user.cgi line 25 with arguments
(GT::Plugins, /home/mysite/link/admin/Plugins, handle_login, CODE(0x831206c)).


---------------------------------------------


You have an idea?
Thank you for your assistance.
Quote Reply
Re: [Oyo] E-Mail Admin on User Registration In reply to
The plugin looks like it uses Links::send_email, which was added in Gossamer Links 3.0. You are using 2.1.1, which doesn't have this function.

Adrian
Quote Reply
Re: [brewt] E-Mail Admin on User Registration In reply to
Is it possible to use GT::Mail->send instead.
Have tried to play around with it but no joy
Quote Reply
Re: [sam123] E-Mail Admin on User Registration In reply to
Hi,

Just wanted to see if anyone has an answer to the last question i posted?