save login information in cookie

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
carteriii
Posts: 65
Joined: Sun Oct 28, 2007 3:13 pm

save login information in cookie

Post by carteriii »

Cookies are already used to save information such as the group information, and it would be nice to add a checkbox to the login screen to allow a cookie to save the login information from computers (like my home computer and my phone) which I feel are secure. When the login information is saved, the login screen would then be bypassed entirely.

For what it's worth, I see the setcookie() function in zm_actions.php, but I'm not much of a web developer so I'm having trouble figuring out where to call that to save the login or where/how to use it once it is saved (presumably somewhere between zm_html.php and zm_html_view_login.php). I do see that zm_html_view_login.php will put a username into the field if "isset($username)" but that appears to only get set from REMOTE_USER which I also don't understand.

I'll keep trying to figure this out for myself and post the results if I can, but a few pointers from a web/php developer would be helpful. Thanks.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

The REMOTE_USER field is only really used if you prefer to do your authentication with http basic authentication (when you get a login and password popup box).

The simple way around things as it stands is just to change your bookmark to be

Code: Select all

http://<your server>/zm/?action=login&username<your user>&password=<your pass>
which will just log you in directly. I agree though, cookies might be useful.
Phil
Post Reply