This topic is locked

Events on After Successful Login not run

9/19/2014 06:26:19
PHPRunner General questions
B
bree author

Dear All,
Using PHPRUNNER 6.2.
I have a table structured like this : userid | username | useremail | userstatus

What i need to do is, everytime the user sign-in, and if he/she haven't status on the table, the script will automatically update the table and set "userstatus = Normal",

So i create an "Event" on "After Succesful Login" as seen below :

-------------------------------------------------------------------------------

//** Check if specific record exists ****

global $conn;

$userid = $data["userid"];

$strSQLExists = "select userstatus from user where userid=$userid";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{

// if record exists do something

}

else

{

//** Update a record ****

global $conn;

$strSQLUpdate = "update user set userstatus = 'Normal' where userid = $userid";

db_exec($strSQLUpdate,$conn);

}

--------------------
But nothing happen everytime i try to sign-in (login), seems that the event "ignored" somehow.
Can anybody tell me what's wrong ?
Thanks before.
ARM

B
bree author 9/19/2014

I think i fix it, i just simply change the value from "true" to "false" in event.php file as shown below :


thanks all

B
bree author 9/19/2014

Sorry..that doesn't fix anything..what i found here is, somtime it works..but somehow..its not working..until now i have no clue.



I think i fix it, i just simply change the value from "true" to "false" in event.php file as shown below :

thanks all

Sergey Kornilov admin 9/19/2014

I'm afraid you doing something wrong there. This is a basic functionality and should just work. Re-install PHPRunner 6.2 just in case to see if this helps.
If you have a valid support contract 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.