PDA

View Full Version : looking for information regarding authentication process...


djdrue
22.04.2004, 23:46
Greetings Mambers,

I am working on a script/component that will allow the site to email users who define certain criteria within the events component.

For example, a user could set the frequency of email (weekly, monthly) and the types of event categories (from the event component) that would be included in the email.

I'd like this script to be accessed through the 'User Menu' area, so when a logged in user called the script, it would retrieve the information that was specified by the user for changes.

I was planning on making a separate table that contained all this information that included the userid as a foreign key in the table.

The first major hurdle (besides only an intermediate knowlegde of php) is that I don't understand how the authentication system works in Mambo. I was wondering if there was some documentation anywhere that describes this process?

For example, I noticed that index.php calls a class:

if ($option == "login") {
$mainframe->login();


but I can't find this class, where should I look?

I'm assuming that once a user is logged in, then the userid varible is already assigned and I could use that in the script, but I'm not sure. I'm guessing that there's probably already some code that I could copy and use in my script, and I'd appreciate anyone's support.

Thank you for your time,

Drue

keliix06
22.04.2004, 23:55
Userid is assigned to $my->id. Look in classes/mambo.php for more info.

djdrue
23.04.2004, 02:30
Thanks for the fast reply...

I looked at the classes in mambo.php

So I guess my primary question is...

What functions should I call to take advantage of the userid when the user is logged in?

Thanks to everyone for their help.

Drue

keliix06
23.04.2004, 03:47
I think it's about 2/3 of the way down. All of the functions dealing with $my.

MamboJoe
23.04.2004, 06:10
What functions should I call to take advantage of the userid when the user is logged in?


use $my->id its a variable that mambo exposes to allow you to identify the user logged in. Remember to include $my in your global registration if you are using this id as part of a function.

Kind Regards,
MamboJoe