Generate Password + 1.3 ONLY FOR Y1G BETA 6, ENGLISH VERSION! This mod generates a new password when a user change his email adress. [CV]XXL http://xxl.cstrike.de Sources\Profile.pl &fatal_error("$txt{'213'}") if($member{'passwrd1'} ne $member{'passwrd2'}); &fatal_error("$txt{'91'}") if($member{'passwrd1'} eq ''); if( $emailpassword && lc $member{'email'} ne lc $settings[2] && $settings[7] ne 'Administrator') { $member{'passwrd1'} = int( rand(100) ); $member{'passwrd1'} =~ tr/0123456789/ymifxupbck/; $_ = int( rand(77) ); $_ =~ tr/0123456789/q8dv7w4jm3/; $member{'passwrd1'} .= $_; $_ = int( rand(89) ); $_ =~ tr/0123456789/y6uivpkcxw/; $member{'passwrd1'} .= $_; $_ = int( rand(188) ); $_ =~ tr/0123456789/poiuytrewq/; $member{'passwrd1'} .= $_; $_ = int( rand(65) ); $_ =~ tr/0123456789/lkjhgfdaut/; $member{'passwrd1'} .= $_; } else { &fatal_error("($member{'username'}) $txt{'213'}") if($member{'passwrd1'} ne $member{'passwrd2'}); &fatal_error("($member{'username'}) $txt{'91'}") if($member{'passwrd1'} eq ''); &fatal_error("$txt{'241'}") if($member{'passwrd1'} !~ /\A[\s0-9A-Za-z!@#$%\^&*\(\)_\+|`~\-=\\:;'",\.\/?\[\]\{\}]+\Z/); } if ( $member{'username'} eq $username ) { $Cookie_Exp_Date = 'Sun, 17-Jan-2038 00:00:00 GMT'; $password = crypt("$member{'passwrd1'}",$pwseed); $yySetCookies = qq~Set-Cookie: $cookieusername=$username; path=/; expires=$Cookie_Exp_Date;\n~; $yySetCookies .= qq~Set-Cookie: $cookiepassword=$password; path=/; expires=$Cookie_Exp_Date;\n~; &LoadUserSettings; &WriteLog; } &ViewProfile; if( $emailpassword && lc $member{'email'} ne lc $settings[2] && $settings[7] ne 'Administrator' ) { #### LOGOUT CODE #### # Write log fopen(LOG, "$vardir/log.txt"); @entries = ; fclose(LOG); fopen(LOG, ">$vardir/log.txt", 1); $field="$username"; foreach $curentry (@entries) { $curentry =~ s/\n//g; ($name, $value) = split(/\|/, $curentry); if($name ne "$field") { print LOG "$curentry\n"; } } fclose(LOG); $yySetCookies = qq~Set-Cookie: $cookieusername=; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~; $yySetCookies .= qq~Set-Cookie: $cookiepassword=; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~; $yySetCookies .= qq~Set-Cookie: $cookieusername=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~; $yySetCookies .= qq~Set-Cookie: $cookiepassword=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~; $username = 'Guest'; $password = ''; @settings = (); $realname = ''; $realemail = ''; $ENV{'HTTP_COOKIE'} = ''; #### LOGOUT CODE #### $yytitle="$txt{'245'}"; &header; &sendmail($member{'email'},qq~$txt{'700'} $mbname~, qq~ $txt{'248'} $member{'username'} $txt{'491'} $member{'username'} $txt{'492'} $member{'passwrd1'} $txt{'701'} $scripturl?action=profile&username=$useraccount{$member{'username'}} ~); print <<"EOT";
$txt{'97'}
$txt{'728'}
 
$txt{'35'}: $txt{'36'}:   $txt{'497'}: $txt{'508'}:
EOT &footer; &FormatUserName($member{'username'}); exit; } else { if ( $member{'username'} eq $username ) { $Cookie_Exp_Date = 'Sun, 17-Jan-2038 00:00:00 GMT'; $password = crypt("$member{'passwrd1'}",$pwseed); $yySetCookies = qq~Set-Cookie: $cookieusername=$username; path=/; expires=$Cookie_Exp_Date;\n~; $yySetCookies .= qq~Set-Cookie: $cookiepassword=$password; path=/; expires=$Cookie_Exp_Date;\n~; &LoadUserSettings; &WriteLog; } &ViewProfile; }
English.lng 1; $txt{'728'} = "You've changed your email adress. You will recieve a new password by email.";