Loading...
 
Skip to main content

Custom Share Module 0.1dev

Development

Development


User login integration question...

posts: 9

Hi - I'm fairly new to TikiWiki and a complete newby to PHP and MySQL. I searched these forums and the online docs but couldn't find an answer to the following problem:

How can I integrate an external application (e.g. www.corvalis.net/address) with the Tikiwiki user login? I currently simply use a Tiki Link to the application, but I suspect there should be a way to synch the user logins. Currently you have to login to tikiwiki, then login to my addressbook. Any ideas how to use the initial tikiwiki login in the addressbook to get a single sign on system would be great...

Be gentle on a newby 😉...

posts: 2881 United Kingdom

Hi There

Tiki can use LDAP authentication or http authenticaion, maybe you can combine that with your application.

Without knowing your custom apps authentication I cant really say the best way.

Good luck

Damian


posts: 9

I'm trying to integrate tikiwiki with a very simple addressbook script with no LDAP capabilities - http://www.corvalis.net/address and right after posting the initial message I saw your reply in the Change post dated April 29:

Damian wrote: "... Incedentally I recall a IRC conversation relating to similar similar but using a iframe on a wiki page and called require_once('tiki-setup.php'); to get the $user available in that script."

If you can recall any details of how to make $user available in another script it will help a lot. I've tried several require_once options but couldn't get it to work...

Thanks for your help!

Regards
DDD


posts: 63 United Kingdom

I think using

Copy to clipboard
require_once(relative/path/to/tiki-setup.php);

should do the trick.

Then, assuming the user is logged on to tiki, $user will contain their username, otherwise it'll be "";

Then you could use an HTML page to include your address book application inside the Tiki application layout using an IFRAME SRC="YourApplication",

You could also tweak the login for your address book to either not check for login if Tiki's $user is supplied
OR
require that they confirm thier password before they can veiw the address book, which you should be able to verify against tiki's...
although the method alludes me at this precise moment.

Also, you can add a clause like

Copy to clipboard
if (!$user) { header("Location: tiki-error.php?error=You must be logged in to use the address book"); };

Assuming headers have not already been sent, of course. Or something similar to throw out errors through tiki as well.

posts: 9

Thanks RussWilde for these tips, but I've tried it and I keep getting the "TikiWiki is not properly set up:" page when using require_once('path to/tiki-setup.php'). It seems the tiki-setup.php script is looking to see whether it's installed correctly in the folder where my address book is, which obviously isn't true.

My folder setup:
/tikiinstallfolder
/tikiinstallfolder/tiki-setup.php
.
.
.
/tikiinstallfolder/addressbook
/tikiinstallfolder/addressbook/addressloginscript.php
.
.
I'm using " require_once('../tiki-setup.php');" in the addressloginscript.php and it then complains that tikiwiki isn't installed in /tikiinstallfolder/addressbook

I wish I knew PHP and MySQL better 😉

Thanks
H


posts: 9

Thanks RussWilde for these tips, but I've tried it and I keep getting the "TikiWiki is not properly set up:" page when using require_once('path to/tiki-setup.php'). It seems the tiki-setup.php script is looking to see whether it's installed correctly in the folder where my address book is, which obviously isn't true.

My folder setup:
/tikiinstallfolder
/tikiinstallfolder/tiki-setup.php
.
.
.
/tikiinstallfolder/addressbook
/tikiinstallfolder/addressbook/addressloginscript.php
.
.
I'm using " require_once('../tiki-setup.php');" in the addressloginscript.php and it then complains that tikiwiki isn't installed in /tikiinstallfolder/addressbook

I wish I knew PHP and MySQL better 😉

Thanks
H


posts: 63 United Kingdom

Sorry, should've realised that would happen.

Have you considered just dropping the files in the tiki root folder?
I would be a cheap quick fix..

Otherwise you'd have to look into the TikiIntegrator ghasp!

Otherwise it might require some crazy-go-nuts idea which I could prolly turn out over a couple of days...


Upcoming Events

1)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4) 
Tiki birthday
5)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting