Write some Software - Autologin URL for JOOMLA 3.x

Completed Posted 7 years ago Paid on delivery
Completed Paid on delivery

I need someone to move a Joomla plugin from one site to another or write some software to do it. The plugin is free but recently got unpublished from the joomla extensions website and I can't find a download for it. It was called "Autologin". It would pass users over to a website logged in simply by the URL.

Url went - [url removed, login to view]

*I've attatched the assoasiated coding on bottom of this char.

***If you can write a Joomla script to sign user in if they were referred by a certain domain this is what we're mainly looking for and would not need url to pass users signed in. If users refered by url "[url removed, login to view]" then I want them to be signed into a specific account on my joomla website. This is our main goal.

----------------------------------------------------------------------

Login By URL Coding -

<?php

defined( '_JEXEC' ) or die( 'Restricted access' );

/**

* @version 2.5.1

* @copyright Copyright (C) 2009 Andrea Parmeggiani. All rights reserved.

* @license GNU/GPL, see [url removed, login to view]

* @autor Andrea Parmeggiani [url removed, login to view]

* See [url removed, login to view] for copyright notices and details.

*

*/

jimport('[url removed, login to view]');

class PlgSystemAutologin extends JPlugin

{

protected $_user;

protected $_passw;

function __construct(& $subject, $config)

{

parent::__construct($subject, $config);

$this->loadLanguage();

}

function onAfterInitialise()

{

$this->_user = JRequest::getVar('user', null);

$this->_passw = JRequest::getVar('passw', null);

if (!empty($this->_user) && !empty($this->_passw)) {

if ($this->params->get('authmethod','1')==='0') {

$result = $this->plainLogin();

} else {

$result = $this->encryptLogin();

}

// if OK go to redirect page

if ($this->params->get('urlredirect', null)) {

if (!JError::isError($result)) {

$app = JFactory::getApplication();

$app->redirect($this->params->get('urlredirect', null));

}

}

}

return true;

}

/**

*

* PLAIN LOGIN

*

*/

function plainLogin() {

// Get the application object.

$app = JFactory::getApplication();

// Get the log in credentials.

$credentials = array();

$credentials['username'] = $this->_user;

$credentials['password'] = $this->_passw;

$options = array();

$result = $app->login($credentials, $options);

}

/**

*

* ENCRYPT LOGIN

*

*/

function encryptLogin() {

// Get the application object.

$app = JFactory::getApplication();

$db =& JFactory::getDBO();

$query = 'SELECT `id`, `username`, `password`'

. ' FROM `#__users`'

. ' WHERE username=' . $db->Quote( $this->_user )

. ' AND password=' . $db->Quote( $this->_passw )

;

$db->setQuery( $query );

$result = $db->loadObject();

if($result) {

JPluginHelper::importPlugin('user');

$options = array();

$options['action'] = '[url removed, login to view]';

$response['username'] = $result->username;

$result = $app->triggerEvent('onUserLogin', array((array)$response, $options));

}

}

}

PHP Software Architecture

Project ID: #10105966

About the project

4 proposals Remote project Active 7 years ago

Awarded to:

nwmclaughlin

This is fairly simple to achieve. I can write a custom joomla plugin to do this. The way you want to do it this isn't very secure but as long as your ok with that then it can be done. If its done the same way the c More

$100 USD in 1 day
(5 Reviews)
3.2

4 freelancers are bidding on average $196 for this job

mituld

Hi I work towards providing reliable, relevant and robust IT solutions at most competitive prices to my customers. I ensure 100% customer satisfaction so lets start Thanks

$360 USD in 13 days
(372 Reviews)
8.1