Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 09:33 am EST
Geeklog Forums
Using Geeklog's username and password in other scripts
Giannis
Anonymous
Hi.
I am currently using geeklog as my main portal application, but have also installed a few third party scripts (noahs classified, etc).
Is it possible for all these other scripts to be able to use my geeklog's usernames and passwords - this way the user will only have to login once instead of logging in for each application seperatly.
Thanks
I am currently using geeklog as my main portal application, but have also installed a few third party scripts (noahs classified, etc).
Is it possible for all these other scripts to be able to use my geeklog's usernames and passwords - this way the user will only have to login once instead of logging in for each application seperatly.
Thanks
8
10
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Include lib-common.php in your scripts. This gives you access to all the current user's information (in the global $_USER array) as well as access to functions like SEC_inGroup to check group membership, etc.
bye, Dirk
bye, Dirk
7
8
Quote
Giannis
Anonymous
Hi Dirk,
Thanks for the information. However, I'm not that familiar with php (starter) so what do I do then - where do I insert this file? What changes have to be made.
You help is much appreciated
Thanks
Thanks for the information. However, I'm not that familiar with php (starter) so what do I do then - where do I insert this file? What changes have to be made.
You help is much appreciated
Thanks
7
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Well, some PHP (basic) knowledge would help when you want to modify PHP scripts ...
Include the lib-common.php using require_once:
(add the path, if necessary). Then you have a global array named $_USER (need to declare this as
// user is logged in
} else {
// the current user is an anonymous user
}
HTH
bye, Dirk
Include the lib-common.php using require_once:
Text Formatted Code
require_once ('lib-common.php');global $_USER;
when used within a function). If $_USER['uid'] is greater than 1, then the current user is logged in. Something like Text Formatted Code
if (isset ($_USER['uid']) && ($_USER['uid'] > 1)) {// user is logged in
} else {
// the current user is an anonymous user
}
HTH
bye, Dirk
8
7
Quote
All times are EST. The time is now 09:33 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content