Page 1 of 1

save login information in cookie

Posted: Sun Dec 09, 2007 2:50 pm
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.

Posted: Thu Dec 20, 2007 6:33 pm
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.