Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
2 posts Page 1 of 1
I've found several threads on the login process, but nothing that shows just how to create a log of users/times of successful logins. Either in a text file or database table. Can anyone point me to this or show me the way it can be done?

TIA!
Hi)

The logic to log username/time can be placed after 'process_login' tag. See the Midware » process_login (Tips) with codesample. Following snippet will save name/time to a text file:
Code: Select all
<cms:log "<cms:concat s1=k_user_title s2=' logged in at ' s3="<cms:date />" />" file='login.log'/>


In case you want to restrict login.log file access via browser with a password, feel free to use my CmsFu » protect-file, protect-folder funcs.

2 posts Page 1 of 1