yoursite.com.br/ativacao.php?email=fernando@mastop.com.br
File ATIVACAO.PHPPHP
### ======================================================
### [url=http://www.xoops.net.br/]XOOPS Brasil[/url] - A comunidade diferente!
### ======================================================
### Arquivo para reenvio de Link de Ativação
### Script for resend the activation link
### ======================================================
### Developer: Fernando Santos, fernando@zend.com.br
### Copyright: www.xoops.net.br © 2003-2004
### ------------------------------------------------------
### www.xoops.net.br
### ======================================================
### v.1.0, Sun Dec 19 15:33:59 BRST 2004
### ======================================================
$xoopsOption['pagetype'] = "user";
include "mainfile.php";
include 'header.php';
// Doesn't matter GET or POST
$email = isset($HTTP_GET_VARS['email']) ? trim($HTTP_GET_VARS['email']) : '';
$email = isset($HTTP_POST_VARS['email']) ? trim($HTTP_POST_VARS['email']) : $email;
// If $email is empty, show form for link resend
if ($email == '') {
echo <<< TOPET05
Put this file in your XOOPS main directory. Then, put a link for it into the login block, and voilá. No need to alter anything else.
If any user claims that it hasn't received the activation link, ask him to go to yoursite.com/ativacao.php and fill in the form.
If you wanna send through GET, likeit'll work without problems.yoursite.com/ativacao.php?email=me@myemail.com
Hope it helps... If someone wanna make the code look better, I'll appreciate it!!
Tested and approved.
Thanks to Izzy for the first tests
Big hug
// If the e-mail doesn't exist in the database, $getuser returns array()...
if ($getuser == array() ) {
echo "E-mail doesn't appear to be registered in our databases!
";
include("footer.php");
exit();
}
Mithrandir wrote:
Looks good. Only change, I'd suggest is this one:// If the e-mail doesn't exist in the database, $getuser returns array()...
if ($getuser == array() ) {
echo "E-mail doesn't appear to be registered in our databases!
";
include("footer.php");
exit();
}
I'll be adding this in XOOPS 2.1 with language constants etc. (but do add it to the patches tracker as it is easy to keep track of it there)
Thanks