This topic is locked

Login Tables

4/28/2005 19:40:25
PHPRunner General questions
pplaut author

Hi,

I am trying to integrate my applicaiton using the mambo portal users table.

The data in the table is encrypted, so when I try to use that for my login screen, it doesn't work.
Ideally, since Mambo is handling the securty, groups, etc. I would just like to be able to grab the Mambo login id and use that. The password security is handled by Mambo.
Then what I would like to do is have the options of sharing the data with other users or not.
Any help in this direction would be appreciated,
Thanks.
Peer

Sergey Kornilov admin 4/29/2005

Peer,
PHPRunner login stores info in two session variables.

$_SESSION["UserID"] contains Username and

$_SESSION["OwnerID"] holds Owner ID value used in Advanced Security.
You can insert the following lines into menu.php just after start_session() clause:

$_SESSION["UserID"] = MAMBOUSERNAME;
// if you use Advanced Security

$_SESSION["OwnerID"] = MAMBOOWNERID;



where MAMBOUSERNAME and MAMBOOWNERID are somehow acquired Mambo login data.

pplaut author 4/29/2005

Thank you, I think I can get it from there <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=4201&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />

Peer

pplaut author 4/29/2005

I am not using the menus, can it go in another common file?

Peer

Sergey Kornilov admin 4/30/2005

Peer,
you can do this in file which is an entry point of your application. I guess this is ..._list.php page.

pplaut author 5/1/2005

I went back into PHP Runner and clicked on the Create Menu Box and PHP Runner did not create the menu.php file.
It looks as if you have not more then one table in your application, a menu is not created. So, when I recreated a test application, and created menu items for a couple of test tables, I was able to get PHP runner to generate a menu.php.
I guess my question is, why if a menu.php script is not created, the variables needed are not included in the first srcript?
I may be exploring the obvious here, it is late and I am tired. I will fiddle with it tomorrow some again.
It looks like this is what is going on.

  1. If you create a single database application, a menu.php is never created and therefore the /include/dbcommon.php is never included in any of the _list _add, etc scripts.
  2. Therefore if you remove the mySQL login variables from the /include/_variables scripts, the app bombs because it cannot find the information from the dbcommon.php file.
    Given this, it seems you need to have a menu.php or similar script, regardless of the number of tables created for the app so you can include the necessary /include scripts in one nice tidy place.
    Thanks for any thoughts you might have on this.
    Peer

Sergey Kornilov admin 5/4/2005

Peer,
please forget about dbcommon.php. Do not try to use it.
You should place all the connection data into dbconnection.php file. This takes care of the issue.