This topic is locked
[SOLVED]

  Management of the accesses by password

4/18/2011 4:02:01 PM
PHPRunner General questions
C
christophe1739 author

We have a national base which includes the accesses login and password.

I wish to use this national base to access to the site PhpRunner on a local base.

I have locally a list of login (management of the rights on the site) but I cannot have access to the passwords of the national base.
I question this natinale base by means of a script Php which indicates to me if the login and the password are correct.
Can you, please, tell me how I can use the national base to access to the local base?
I'm not sure I'm clear, so don't hesitate to ask more question.
Thanks a lot for all your answers.
http://xlinesoft.com/phprunner/docs/login_page.htm

Sergey Kornilov admin 4/20/2011

Yes, it's not really clear but I'll try to answer anyway.
I guess you have two different databases and need to use external database to control user login process. To do so you can implement BeforeLogin event where you can connect to another database and verify username/password validity.
More info on BeforeLogin event:

http://xlinesoft.com/phprunner/docs/before_login.htm

C
christophe1739 author 4/21/2011

Thank you for your answer, I wish to establish a connection on a base extern to manage the password.

The username is common between the base extern and the local table to manage the rights on the site created by PhpRunner.

Here is the script of connection that I use in "Event / Before Display" but it doesn't work !!!!



if ($username!='' && $password!="")

{

$ldapconn=ldap_connect('XX.XXX.XX.XX') or die ('Impossible de se connecter au serveur LDAP');

if ($ldapconn)

{

//vérification de la connexion

$ldapbind=@ldap_bind($ldapconn, 'cn='.$username, $password);

if($ldapbind)

{$resultat='Connexion acceptée';

$message=='True';

}

else

{$resultat='Connexion refusée';}

}

}

else

{

$resultat='Veuillez saisir votre code';

}

echo $resultat;
echo '</center>';
Sergey Kornilov admin 4/21/2011

If you need help with LDAP connection check this article:

http://www.asprunner.com/forums/topic/8991-howto-use-ldap-authentication/
If you need more help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.