This topic is locked

Windows authentication

8/14/2009 10:35:45 AM
PHPRunner General questions
M
mauro author

Implementing 'single sign on' feature

http://www.xlinesoft.com/phprunner/docs/im...gle_sign_on.htm

don't work...there is a little error with [ and ) in the code.
However i insert in login page:Before process this code (windows 2003 server and IIS)

but i use domain user\password i cannot login.
// Login page: Before process

function BeforeProcessLogin(&$conn)

{
if ($_SERVER["REMOTE_USER"])
{
$_SESSION["UserID"] = $_SERVER["REMOTE_USER"];
$_SESSION["AccessLevel"] = ACCESS_LEVEL_USER;
header("Location: menu.php");
exit();
}

// Place event code here.

// Use "Add Action" button to add code snippets.

;

} // function BeforeProcessLogin

J
Jane 8/17/2009

Hi,
It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

M
mauro author 8/18/2009

Hi,

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.


Ok, now it's ok....but afer authentication i have "user registered as domain\user-name" it's possible have only "user registered as user-name" without domain name?

J
Jane 8/18/2009

Hi,
you can re-define username on the list page using Before display event on theEventstab.

Here is a sample:

$arr = explode("/",$_SESSION["UserID"]);

$username = $arr[1];

$xt->assign("username",$username);

M
mauro author 8/18/2009

Sure!!! i mistake something !

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=43519&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
// Login page: Before process

function BeforeProcessLogin(&$conn)

{
if ($_SERVER["REMOTE_USER"])
{
$_SESSION["UserID"] = $_SERVER["REMOTE_USER"];
$_SESSION["AccessLevel"] = ACCESS_LEVEL_USER;
header("Location: menu.php");
exit();
}

// Place event code here.

// Use "Add Action" button to add code snippets.

;

} // function BeforeProcessLogin
// Login page: Before display

function BeforeShowLogin(&$xt,&$templatefile)

{
$arr = explode("/",$_SESSION["UserID"]);

$username = $arr[1];

$xt->assign("username",$username);
// Place event code here.

// Use "Add Action" button to add code snippets.

;

} // function BeforeShowLogin

J
Jane 8/19/2009

Hi,
It's hard to understand what's wrong with your code.

I recommend you to publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

M
mauro author 8/19/2009

Hi,

It's hard to understand what's wrong with your code.

I recommend you to publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.


I published my project on demo account, i don't have error....only user is always "domain name\user-name"