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.
Jul 11, 2006, 11:45 AM
User (137 posts)
Jul 11, 2006, 11:45 AM
Post #7 of 19
Views: 7213
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!
Jul 11, 2006, 1:09 PM
Enthusiast (854 posts)
Jul 11, 2006, 1:09 PM
Post #8 of 19
Views: 7166
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.
Philip
------------------
Limecat is not pleased.
Jul 21, 2006, 1:57 PM
User (137 posts)
Jul 21, 2006, 1:57 PM
Post #10 of 19
Views: 7152
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.
Jul 21, 2006, 2:10 PM
Enthusiast (854 posts)
Jul 21, 2006, 2:10 PM
Post #11 of 19
Views: 7096
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.
<%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
Sep 7, 2006, 6:43 PM
Enthusiast (854 posts)
Sep 7, 2006, 6:43 PM
Post #15 of 19
Views: 6987
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.
Philip
------------------
Limecat is not pleased.
Sep 9, 2006, 12:54 AM
User (242 posts)
Sep 9, 2006, 12:54 AM
Post #16 of 19
Views: 6980
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.
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.