Write some Software - Autologin URL for JOOMLA 3.x

Completado Publicado hace 7 años Pagado a la entrega
Completado Pagado a la entrega

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 Arquitectura de software

Nº del proyecto: #10105966

Sobre el proyecto

4 propuestas Proyecto remoto Activo hace 7 años

Adjudicado a:

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 Más

$100 USD en 1 día
(5 comentarios)
3.2

4 freelancers están ofertando un promedio de $196 por este trabajo

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 en 13 días
(372 comentarios)
8.1