Module: Login Notifier
#1
Posted 29 September 2011 - 10:04 AM
Works with all logins. So if you've made your own login form on the front end of your site, this will still work with it.
Download at:
https://github.com/r...n/LoginNotifier
After you click the install button in Admin > Modules, you will get a configuration screen that looks like the following (attached).
#2
Posted 29 September 2011 - 10:13 AM
#4
Posted 29 September 2011 - 02:03 PM
@somartist | modules created | support me, flattr my work flattr.com
#5
Posted 29 September 2011 - 02:29 PM
Suggestion: could be really nice if this module can save every login as pw page (choosing the parent page as option)...so an admin can control anytime all logins in his website.
I like the way you are thinking! Sounds like an interesting possibility, but a much bigger project.
would it be to log date time too ?
There is actually a {datetime} tag that you can use in it. It's not documented with the module because the date/time is already a component of any email, and the log already records date/time whether you specify it or not. So the only place it might be useful is in the ping URL... though it's probably better for the ping URL to get it's time from the server rather than the request. But I didn't realize all this until after I'd added the {datetime}, so it should be there if you want it.
#6
Posted 29 September 2011 - 02:45 PM
As for the pinging, yes I would also do that on the requested php side, no need to hand that over url get variable.
I agree with having saved pages is thinking PW way, but in this scenario better have a different way of storing the data. How about something using file system with saved logfiles? Maybe not THE idea but just came to mind.
@somartist | modules created | support me, flattr my work flattr.com
#7
Posted 29 September 2011 - 03:32 PM
EDIT: installed, tested, so far works as expected! thanks Ryan
@somartist | modules created | support me, flattr my work flattr.com
#10
Posted 29 March 2012 - 08:54 AM
#11
Posted 31 March 2012 - 10:18 AM
I'm a freelance, processwire-using web designer based in california. work site | personal site | visuals
#13
Posted 01 April 2012 - 02:19 AM
IP: {REMOTE_ADDR}
you can find a list of all the other PHP server variables which can be used here :
http://php.net/manua...bles.server.php
#14
Posted 17 September 2012 - 09:31 AM
#15
Posted 17 September 2012 - 09:43 AM
$config->debug = true;then whenever I submit a change to the settings of the LoginNotifier I see at the top of the rendered page:
Notice: Undefined variable: this in /my-test-website.alan/site/site/modules/LoginNotifier/LoginNotifier.module on line 197
I assume this is nothing to be worried about and just a variable that has not been established before it's used (like I know what I am typing there... I know so little PHP
#17
Posted 18 September 2012 - 04:47 AM
#18
Posted 14 January 2013 - 02:42 PM
Hi there,
I've just come across this module and it worked as expected. Thanks a lot.
I changed a little thing though, for my personal use, and I don't know if this could be of any interest for someone else. (It's the very first time I look inside a module...)
Line 72 :
if(!$user) return;
I changed to :
if(!$user || $user->isSuperuser()) return;
My point was that I received emails even when I was logging in my site and since it's a very little amateur site with _let's admit_ no traffic (for the moment ;-) ), I kept receiving mails indicating I logged in... Now, with my little tweak, I get emails only when other members log in which is what I wanted ;-)
Now here's my thought : I thought some kind of list of roles (or users?) could be added to the settings page of the module so one could only check (or uncheck) some roles to be ignored from keeping a record (either mail or log entries) without actually touching the module code.
I don't know if I'm being very clear there... and actually I have no idea if this kind of idea is shared... But if it is, I would be glad to try and see what I can do to include such a feature in the module, even though I'm starting from very low considering my developer skills (but I'm eager to learn and improve).
Thanks for letting me know if you think that would be a loss of time ! (Or if I did a mistake changing my little line 72).
#19
Posted 15 January 2013 - 09:08 AM
Good idea. I've added a role exclusion feature to the module's configuration so you can check boxes next to any roles you want excluded from sending notifications.
https://github.com/r...4270a23866626e8
#20
Posted 15 January 2013 - 02:09 PM
Waow! That was quick!
Well, what can I say except THANKS!
Why did you exclude 'guest' role in the list? I guess I can understand that the Login Notifier module's point is to notify the 'guests' login actions, but why not let people decide? i can imagine someone interested in receiving mails only if a paricular role logs in (but not 'guest').
Anyway, that's just a supposition from my side. Your work is just fine for my use as it is so thank you very much.
Now that I don't have to try and do that myself (which would have taken me a lot more time, definitely!), I'll look at your code to see what i should have done ;-) Thanks in advance for the lesson !
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













