Ajax Username checker cb_login username error

11 years 11 months ago - 11 years 11 months ago #201064 by oe6tkt
I found a strange situation within the Ajax Username checker.
Description:
When registering on my page on www.loytec.com all is okay.
But registering with loytec.com, the checker prints out "error" when entering a username.
Possible, when the entry "var live_site" in the configuration file (configuration.php) is not identical to the used address - the 'Ajax Username checker' fails.
I just think, this is happening within plugin.class.php line 1965 - I will check this out.
$url					=	"index.php?option=com_comprofiler&task=fieldclass&function=checkvalue&user=$userid&reason=$reason";

		if ( $_CB_framework->getUi() == 2 ) {
			$ajaxUrl			=	$live_site . '/administrator/' . $_CB_framework->backendUrl( $url, false, 'raw' );
		} else {
			$ajaxUrl			=	cbSef( $url, false, 'raw' );
		}

Best regards
Thomas
www.loytec.com

CB1.8, SEF on (but with SEF off, this behavior do exist too), Joomla 1.5.26

Please Log in to join the conversation.

11 years 11 months ago #201069 by oe6tkt
Hello,

For this behavior,
I've changed the function getCfg( $config )
within administrator/components/com_comprofiler/plugin.foundation.php at line 2524 (added 2 lines) to
case 'live_site':
	if ( checkJversion() >= 1 ) {
		if ( $this->getUi() == 1 ) {
			//$live_site	=	JURI::base();
			$u	=	JURI::getInstance(JURI::current());
			$live_site	=	$u->toString( array( 'scheme', 'host', 'port') );
		} elseif ( checkJversion() == 2 ) {
			$live_site	=	preg_replace( '%administrator/%', '', JURI::base() );
		} else {
			$live_site	=	$this->_baseFramework->getSiteURL();
		}
		if ( substr( $live_site, -1, 1 ) == '/' ) {
			// fix erroneous ending / in some joomla 1.5 versions:
			return substr( $live_site, 0, -1 );
		} else {
			return $live_site;
		}
	}

best regards,

Thomas Kuschel
www.loytec.com
Tested with CB 1.8, Joomla 1.5.26, SEF on, $live_site is set

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.137 seconds

Facebook Twitter LinkedIn