1
ccrstudioweb
SSL in registering new user

Hi all!
I got the ssl work fine for login in my site: it opens in a popup as described in other topics. But now I have a hard task: SSL on login (and after in edit user...).
My intention is protect the areas where user type the pswd.


I started by (backup the register.php) extracting the lines
include 'header.php';
from the register.php in order to the file not call anyhttp://.

This step is over: I can open register php whithout header in a ssl mode: (please check it our)https://mensageiro.org/portal/register.php
and I can complete the filds, but when clicking FINISHING, it tells: it was not possible made your registration. :( And really, the email wasn´t sent and the user was not registered.

My intention is after this all, open this page in a popup as when logging in.
Please, it will be very useful for many people.


I know that if I extract
include 'header.php';
, I have to put some include 'header.php'; code on it, but I don´t know what. I tried use header lines
defined("XOOPS_ROOT_PATH") or die( 'XOOPS root path not defined' ); 
 include_once 
XOOPS_ROOT_PATH.'/class
/xoopsblock.php'
;  //global 
$xoopsLogger;  if ( !isset( $xoopsLogger 
) ) {        $xoopsLogger =& 
$GLOBALS['xoopsLogger'];    }  
$xoopsLogger->stopTime'Module init' ); 
$xoopsLogger->startTime'XOOPS output 

init' 
);
but when debbug PHP
Fatal error: Call to undefined function
themefooter() in /home/wimbgiuia/public_html/portal/footer.php on line 44


Thank you all for helping.
My Google Maps API3 and Xoops integration (Cool!):
http://www.esterecomendo.com.br/portal/

2
ccrstudioweb
Re: SSL in registering new user

See, I just only extract the three footer.php includes from register.php.

When a new user registers, the final message is:
$result = $xoopsDB->query($sql);
list($count) = $xoopsDB->fetchRow($result);
if ($count > 0) {
$stop .= _US_EMAILTAKEN."<br />";
}
$count = 0;
if ( $email ) {
$sql = sprintf('SELECT COUNT(*) FROM %s WHERE email = %s', $xoopsDB->prefix('users'), $xoopsDB->quoteString(addslashes($email)));
$result = $xoopsDB->query($sql);
list($count) = $xoopsDB->fetchRow($result);
if ( $count > 0 ) {
$stop .= _US_EMAILTAKEN ."<br />";
}
}


What I want is to have a simple page, without header nor footer, But I can´t simply extract the includes, I need to have something on the places in order to page complete the requestion.


I´ve noticed one thing: I use the original register.php inhttp://register.php and everything ok. But when registering using sslhttps://register.php i´ve got the same US_EMAILTAKEN: not possible register the new user
My Google Maps API3 and Xoops integration (Cool!):
http://www.esterecomendo.com.br/portal/

3
Kiwi_Chris
Re: SSL in registering new user
  • 2009/5/21 4:13

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


This is a really good idea and should be in the core,

Hope we can get this working.

I have tagged this I hope you find a way to make this work, security is important.

4
ccrstudioweb
Re: SSL in registering new user

The XOOPS make it possible protect the login page, but I think 2 more should be protected as well: the register page and the edit profile page where you type the pswd
My Google Maps API3 and Xoops integration (Cool!):
http://www.esterecomendo.com.br/portal/

5
Kiwi_Chris
Re: SSL in registering new user
  • 2009/5/22 3:29

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


There is an option to use SSL on login but its only a option for users it does not force users.

and your right registration and edit profile should also be SSL

6
ccrstudioweb
Re: SSL in registering new user

If I access thehttps://register.php instead ofhttp://register.php the condition IF got into true:

if (!$member_handler->insertUser($newuser)) {
echo _US_REGISTERNG;
include 'footer.php';
exit();
}

noit possible insert new user.

I believe the problem is relating to pages address, so i changed
'XOOPS_URL' into 'XOOPS_URL2'
and add the line;
define 'XOOPS_URL2', 'https://mywebsite.com/portal'); But doesn´t work.

As related in a other forum, the register has three actions:
case 'newuser':
case 'register':
case 'finish':
in the third finish happens the registration error:if (!$member_handler->insertUser($newuser)) {echo _US_REGISTERNG;
And really, the data is not inserted in MySQL table and returns the error.


My Google Maps API3 and Xoops integration (Cool!):
http://www.esterecomendo.com.br/portal/

7
ghia
Re: SSL in registering new user
  • 2009/5/26 17:21

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I believe there is a problem that there is no check for failing of the queries as eg:
if (!$result) {
   die(
"query failed: " msql_error());
}

Login

Who's Online

163 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits