This topic is locked

Login and check grants

6/16/2006 13:14:07
PHPRunner General questions
T
TheSaint author

Hi Iike to use the login page sometimes we do have a table of users and passwords, so that is easy. But we have a grants table which further qualifies whether you are allowed to use this particular application. Does anyone have an example of a solution, for example maybe a custom code event which further checks the grant and boots you out if you if the grant does not exist. What is really needed is the ability to generate a custom query for the login page, not just specifiy the table name, but I would settle for a workaround...

Sergey Kornilov admin 6/16/2006

I guess you can use AfterSuccessfulLogin Event to run a query against Grants table.

In this Event you can use @_Session["UserID"] that holds UserID or logged user.

T
TheSaint author 6/16/2006

That would work for me. If we determine the user does not have the correct grants is there a way to invalidate the session/log him out?
Also any way to disable the "Remember Password" check box on login?
Thanks -

I guess you can use AfterSuccessfulLogin Event to run a query against Grants table.

In this Event you can use @_Session["UserID"] that holds UserID or logged user.

J
Jane 6/19/2006

Hi,
open generated login.php file, locate and remove the following code snippet:

<td align=right width="50%">

<div align="left"><?php echo mlang_message("REM_PASSWORD");?>:</div>

</td>

<td width="50%">

<input type=checkbox name=remember_password value="1" <?php echo $strChecked;?>>

</td>

</tr>