Login     Sign up
Rename Admin?
Zapto (@zapto)
Join date: Sep 15th 2010
Community posts: 103
View Profile
Send Message

I have test this modules on two servers and have no problem. Maby you have another problems or have "Freeservers" and the mysql not are corected.

174 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

this error occurs when you use capital letters.

Using the example given here, changing the username to 'Miles' gives you an 404 eror. 'miles' doesn't give an error.

174 months ago
AL (@switch48)
Join date: Sep 1st 2010
Community posts: 450
View Profile
Send Message

[quote=falcone]this error occurs when you use capital letters.

Using the example given here, changing the username to 'Miles' gives you an 404 eror. 'miles' doesn't give an error. [/quote]

BINGO thanks "falcone" that was it the capital letters thing didn't even cross my mind doh....All good in the hood once again :)

174 months ago
fantastica (@fantastica)
Join date: Nov 26th 2010
Community posts: 82
View Profile
Send Message

zipp2000 , Zapto ...
realy thank u for this great modules .
but :
can u display the old email wen want to change ?
users have many emails , then maybe they forget there email wen register ....
thank u men

171 months ago
fantastica (@fantastica)
Join date: Nov 26th 2010
Community posts: 82
View Profile
Send Message

zapto :
there is an error in the username change
function ValidateForm(){
var emailID=document.frmSample.email

if ((emailID.value==null)||(emailID.value=="")){
    alert("Please Enter username!")
    emailID.focus()
    return false
}
if (echeck(emailID.value)==false){
    emailID.value=""
    emailID.focus()
    return false
}

why emailID ??
it is not work with me perfect

and i test it wen change to blank it realy change with blank name , then wen login i login with blank name and password !!!!

can u fix this please ??

171 months ago
fantastica (@fantastica)
Join date: Nov 26th 2010
Community posts: 82
View Profile
Send Message

please check all the code :
<?php
// Script made by zapto for Jcow
// Lets members change username live in site while sending message to user about change

class usernamechange {
function index() {
global $client;
$er=$_Get['e'];
section_content('<div align="center">
<p>For security reasons we will send a copy of this request to your E-Mail accounts</p>
<p><b><BR><font color="#FF0000">'.$er.'</font></b></p>
<script language = "Javascript">
function echeck(str) {

    var at="@"
    var dot="."
    var lat=str.indexOf(at)
    var lstr=str.length
    var ldot=str.indexOf(dot)
    if (str.indexOf(at)==-1){
       alert("Please Enter username")
       return false
    }

    if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
       alert("Please Enter username")
       return false
    }

    if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
        alert("Please Enter username")
        return false
    }

     if (str.indexOf(at,(lat+1))!=-1){
        alert("Please Enter username")
        return false
     }

     if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
        alert("Please Enter username")
        return false
     }

     if (str.indexOf(dot,(lat+2))==-1){
        alert("Please Enter username")
        return false
     }

     if (str.indexOf(" ")!=-1){
        alert("Please Enter username")
        return false
     }

     return true                    
}

function ValidateForm(){
var emailID=document.frmSample.email

if ((emailID.value==null)||(emailID.value=="")){
    alert("Please Enter username!")
    emailID.focus()
    return false
}
if (echeck(emailID.value)==false){
    emailID.value=""
    emailID.focus()
    return false
}
return true

}
</script>
<form method="post" name="frmSample" action="usernamechange/change" onSubmit="return ValidateForm()">
<table width="398" border="0">
<tr>
<td>
<table width="100%" border="0">
<tr>
<td width="36%">New username <br>
</td>
<td width="64%">
<input type="text" name="username" size="30">
</td>
</tr>
<tr>

        </tr>
      </table>
      <p align="center"> 
        <input type="submit" name="Submit" value="Send Request">
      </p>
    </td>
  </tr>
</table>

</form>');
section_close('Change username');
}
function change() {
global $client;
// check user is loged in if not will refuse acccess it not needed but handy extra security
session_start();

if (!array_key_exists('uid', $_SESSION)) {
header('Location: usernamechange&e=Request Refused Please Login!');
//If not member send back to your domain

}
else {
//end check
}
//now check username validation
$ema=$_POST["username"];
$ser=$_SERVER["SERVER_NAME"];
$uip=$_SERVER['REMOTE_ADDR'];
$usr="{$client['username']}";

$query="select username from ".tb()."accounts "." WHERE username='$ema'";
$result=mysql_query($query);

//check username not used in database
if($row = mysql_fetch_array($result)) {//if we did return a record

section_content('<B>ERROR!<BR><BR>The Email '.$ema.' is restricted on our server (In USE)!</b><BR><BR><BR>Your IP ('.$_SERVER['REMOTE_ADDR'].') WAS LOGED!');
return 1;
}else{

}

//Now post username of change
$to="{$client['username']}";
$subject="Email Change Request for {$client['username']}";
$header="from: Account Support no_reply@$ser";

$messages= "Hello {$client['username']}, \r\n";
$messages.="We got Request to change username You can see the change info below. \r\n";
$messages.=" \r\n";
$messages.="Change form: {$client['username']} \r\n";
$messages.="Change To: $ema \r\n";
$messages.=" \r\n";
$messages.=" \r\n";
$messages.=" \r\n";
$messages.="Request sent from IP-$uip \r\n";
$messages.="Report from IP to http://$ser Support if you did not do this Request. \r\n";
$sentmail = mail($to,$subject,$messages,$header);

section_content('You have changed your username to '.$ema.' <BR>Copy of this change was sent to '.$client['username'].'<BR><BR> Your '.$uip.' was loged');

//now we update username on account after message send
sql_query("update ".tb()."accounts set username='$ema' where id='{$client['id']}' ");

    section_close('username Change Complete!');

}

}
?>

171 months ago
fantastica (@fantastica)
Join date: Nov 26th 2010
Community posts: 82
View Profile
Send Message

another thing :
my ftp acounts name and hosting server display on the email message !!!!
why ??? why the user see this informations ??
please make it just the site name only .

thank u men

171 months ago
John D (@johnd)
Join date: Oct 29th 2010
Community posts: 132
View Profile
Send Message

Which email message?

171 months ago
fantastica (@fantastica)
Join date: Nov 26th 2010
Community posts: 82
View Profile
Send Message

sory
after i chek it .... it not from the module , it frome the jcow mail . wen i get my pass word or evry email message , my ftp name and hosting is disply !!! how can i fix this .

171 months ago
fantastica (@fantastica)
Join date: Nov 26th 2010
Community posts: 82
View Profile
Send Message

another thing important ::
the username change cant change names , it change email just !
wen i enter name like " sofian600 " it not changes , but sofian600@gmail yes change . plaese update the script .
thank you

171 months ago
fantastica (@fantastica)
Join date: Nov 26th 2010
Community posts: 82
View Profile
Send Message

can i add recaptcha to this modules ?

171 months ago
sujay sreedhar (@webkoot)
Join date: Nov 11th 2010
Community posts: 98
View Profile
Send Message

but getin wrong uri!

171 months ago
Prev 1 2