Hello Joombers,
I just fantastico-installed joomla 1.0.5, and everything works great, but I am modifying a few lines of PHP and need some help.
I am working with the mod_login module found at [
http://joomla.org.in/doc/modules/mod...p.source.html]
text only version at :[
http://joomla.org.in/doc/modules/mod...hp.source.txt]
As you can see by that file, it is simple SQL authentication. The index.php file calls it and then the mod_login module searches the database for credentials and displays appropriate HTML based on results. What I am trying to do is automatically log a user in just based on an external link. The link will call the joomla index.php file, and the mod_login module will determine if [based on the variables passed in the link], the user will be logged in or simply presented with an option to register.
Currently, if you just call the index.php? file, it presents the user with the option to login or register [found at line 73]. I want to be able to have the user authenticated automatically via the link that comes from an OUTSIDE SITE, for example, if a partner website has a link to our site like,
http://www.educationforliberty.com/a...&autologin=yes
I know that others will be able to see username/password combinations, but all it means for us in this situation is that we control the access that is granted based on inbound external links.
I am looking for a solution that will fall right around line 73 and search the SQL database for credentials, and redirect the window if the proper credentials are given. If they are not given, then the user is presented with the default login/register form found after line 73.
I have attempted to do this at line 73 with
_____________________________
// autologin if a user
if ( $autologin == yes) {
$location = 'http://www.educationforliberty.com/altapps/index.php?option=com_content&task=view&id=12&Itemi d=27&data=final_destination_for_authenticated_link ';
print "<script language=\"javascript\">\n";
print "document.location.href=\"$location\"\n";
print "</script>";
}
else {
//load default html to offer registration for user
// open else statement found in original
?>
_____________________________
but there is no authentication aspect in SQL