Page 1 of 1

login

Posted: Mon Sep 12, 2005 11:08 am
by jameswilson
Can i pass login infomation via a url so that a user doesnt have to login?

ie 192.44.44.44/zm/index.php?user=djfhsbf&pass=password

I have tried a few but fail

Any ideas

James

Posted: Mon Sep 12, 2005 8:50 pm
by cordel
The variables are different for the main page. I haven't played with it but it might be able to be done something like:
http://192.168.10.20/index.php?view=con ... mypassword

I know the above url will not work as this needs to be pointed to the login ( I tried view=login really quick and it didn't work) script some how. I'm not a php guru so I couldn't say for sure the proper way.
Regards,
Cordel

Posted: Mon Sep 12, 2005 10:00 pm
by krzys31337
Try this and set "mymagic" to anything.

Code: Select all

--- web/zm_html.php 2005-05-17 23:51:39.000000000 +0200
+++ web/zm_html.php 2005-07-15 17:50:33.000000000 +0200
@@ -26,6 +26,9 @@
 //ini_set( "magic_quotes_gpc", "Off" );

 require_once( 'zm_config.php' );
+require_once( 'zm_lang.php' );
+require_once( 'zm_funcs.php' );
+require_once( 'zm_actions.php' );

 if ( ZM_OPT_USE_AUTH )
 {
@@ -34,6 +37,10 @@
    {
        $user = $_SESSION['user'];
    }
+   elseif ( isset( $_GET['mymagic']) )
+   {
+       userLogin($_GET['luser'],$_GET['lpass']);
+   }
    else
    {
        unset( $user );
@@ -53,9 +60,6 @@
    );
 }

-require_once( 'zm_lang.php' );
-require_once( 'zm_funcs.php' );
-require_once( 'zm_actions.php' );

 $bw_array = array(
    "high"=>$zmSlangHigh,

Posted: Mon Sep 12, 2005 10:17 pm
by jameswilson
looks wonderful, thanks.

What do i do with it?

James

Posted: Mon Sep 12, 2005 10:27 pm
by cordel
It is a patch to add modifications into the zm_html.php page.
You can put this in a txt file and run patch against it to modify your zm_html.php.
at the comand prompt just type:
man patch

This will give you the instructions and proper syntax to apply the patch.
Regards,
Cordel

Posted: Tue Sep 13, 2005 1:23 pm
by zoneminder
I _think_ adding 'action=login' to the original url should work as well. Not tried it yet though so no guarantees :lol:

Phil

Posted: Tue Sep 13, 2005 3:24 pm
by jameswilson
i prefer the option login way i will try and let you know thanks Phil

James