Can I run update upon connect
initcmd UPDATE users SET last_login=NOW() WHERE user_name='%s' LIMIT 1
There is no error but last_login is not updated.
How can I do this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, hm.. The %s or %u expansion isn't available in that command. Not that this won't achieve what you're looking for, though (that's executed only once upon initial connection, and 1) connections are persistent, so other users could log in using the same connection and b) this command would get run for *every* lookup, including 'ps' and 'ls' etc ..
The only real way to do what you're trying to do is via a PAM module. The pam_mysql project *may* provide this, but I'm not sure. It may need to be written. I have plans to write one, but it'll be some time before it's ready.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can I run update upon connect
initcmd UPDATE users SET last_login=NOW() WHERE user_name='%s' LIMIT 1
There is no error but last_login is not updated.
How can I do this?
Ah, hm.. The %s or %u expansion isn't available in that command. Not that this won't achieve what you're looking for, though (that's executed only once upon initial connection, and 1) connections are persistent, so other users could log in using the same connection and b) this command would get run for *every* lookup, including 'ps' and 'ls' etc ..
The only real way to do what you're trying to do is via a PAM module. The pam_mysql project *may* provide this, but I'm not sure. It may need to be written. I have plans to write one, but it'll be some time before it's ready.
i'm glad i signed up for this newsletter. i was wondering that same thing.
cinergi, i'd like to say thanx for this awesome module. makes life so much easier for someone like me, who codes everything from scratch.
please post in the forums when you release the module you were referring to.