Lostpass mod

Download plugins, language packs and stuff.

Lostpass mod

Postby FI-DD » Wed Feb 01, 2006 12:28 pm

With this mod you can email yourself a new password if you forgot your old one.



Installation:

Please read the readme file.
Attachments
lostpass.zip
Lostpass
(2.52 KiB) Downloaded 874 times
Last edited by FI-DD on Tue May 12, 2009 3:28 pm, edited 2 times in total.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Tommy B. » Fri Feb 24, 2006 3:12 am

Thanks for this plugin. Was looking for it!
Tommy B.
 
Posts: 7
Joined: Fri Feb 24, 2006 1:39 am

Postby Saszoo » Wed Oct 25, 2006 6:34 pm

Hi,

been busy fixing my computer, but I'll try to start bothering you again :lol:



Well I had to reinstall windows and delete all my stuff and in the prosess I lost alot of passwords :cry: :oops:

So luckily we have this plugin...

I got the files uploaded and made the script mail me the files, but the new password don't seem to work :?:

It's whats between the << and >> right? not including them? Tried that anyway, but I just can't get in...

Any Ideas?

Thanks...
User avatar
Saszoo
 
Posts: 414
Joined: Wed Jun 07, 2006 10:34 pm
Location: Norway

Postby FI-DD » Thu Oct 26, 2006 10:09 am

Edit the password in phpmyadmin and put this in:

Code: Select all
35f504164d5a963d6a820e71614a4009




You should now be able to login with pass.



If you want to create a password yourself use this page: http://md5-online.de



Enter your password, convert it, enter the result and convert it again.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Saszoo » Thu Oct 26, 2006 10:58 am

Thanks:D

Saved my day
User avatar
Saszoo
 
Posts: 414
Joined: Wed Jun 07, 2006 10:34 pm
Location: Norway

Postby ivanh » Sun Oct 28, 2007 6:15 pm

i come up with this error

Code: Select all
Fatal error: Cannot redeclare makerandompassword() (previously declared in /home/*****/public_html/*****/control/lostpass.php:89) in /home/*****/public_html/*****/control/plugins/newsletter.php on line 400


when i try to go to www.domain.com/cutenewsru/lostpass.php

should i have use the include function instead?

or is something clashing with newsletter plugin?
ivanh
 
Posts: 75
Joined: Thu Aug 16, 2007 2:41 pm

Postby FI-DD » Fri Nov 02, 2007 3:11 pm

Find one of the makerandompassword() functions and put this around it:
Code: Select all
if(!function_exists('makerandompassword')){
  here comes the function
}
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby beenz » Tue Mar 10, 2009 9:15 pm

FI-DD wrote:Find one of the makerandompassword() functions and put this around it:
Code: Select all
if(!function_exists('makerandompassword')){
  here comes the function
}

I found two codes like this: makerandompassword() do y need to change all of them. when i change second one, then it gives me error
Code: Select all
Parse error: syntax error, unexpected T_IF, expecting T_STRING in /home/solution/public_html/kpaneel/lostpass.php on line 88
[quote][/quote]
beenz
 
Posts: 26
Joined: Wed Mar 04, 2009 10:29 pm

Postby FI-DD » Fri Mar 13, 2009 2:42 pm

You can change both of them but you don't have to.

About your parse error: You must have made a little mistake when changing the code. Please post your code from lostpass.php or attach it as a txt file.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Here is the lostpass.php code

Postby beenz » Fri Mar 13, 2009 6:59 pm

Code: Select all
<?php
/////////////////////////////////////////////////////////////////////
//Lostpass mod based on lostpass.php from CuteHack               //
//Modified for CuteNews.RU by FI-DD                           //
//http://english.cutenews.ru/forum/profile.php?mode=viewprofile&u=2//
/////////////////////////////////////////////////////////////////////

include('./head.php');
require_once("./data/config.php");
require_once("./skins/${config_skin}.skin.php");
$echo = cute_lang('addons/lostpass');

if($action == "dosend"){

   if($user == "" or $email == ""){
      msg('error', $echo['error'], $echo['empty'], 'javascript:history.back(1)');
   }
   
   else{
   
      if(!$query = $sql -> select(array('table' => 'users', 'where' => array("username = $user", "and", "mail = $email")))) {
         msg('error', $echo['error'], $echo['notFound'], 'javascript:history.back(1)');
      }
   
      else{
      
         foreach($query as $row){
         
            $new_pass = if(!function_exists('makerandompassword')){
               here comes the function
            };
            $sql -> update(array(
            'table' => 'users',
            'where' => array("id = ".$row['id'].""),
            'values' => array('password' => md5x($new_pass))
            ));
            
            cute_mail("$email", $echo['mailSubject'], sprintf($echo['mailMessage'], $user, $new_pass));
            
            msg("info", $echo['headerSent'], sprintf($echo['passwordSent'], $user, $email, $config_http_script_dir));
         }
      }
   }
}

elseif($action == "showlostpass"){

echoheader("user", $echo['header']);

   echo"<form method=post action=\"\"><table border=0 cellpading=0 cellspacing=0 width=\"654\" height=\"59\" >
   <td width=\"18\" height=\"11\">
   <td width=\"71\" height=\"11\" align=\"left\">

   ".$echo['username']."<td width=\"203\" height=\"11\" align=\"left\">
      <input type=text name=user seize=20>
   <td width=\"350\" height=\"26\" align=\"left\" rowspan=\"2\" valign=\"middle\">
      ".$echo['description']."
      <tr>
      <td width=\"18\" valign=\"top\" height=\"15\">
       <td width=\"71\" height=\"15\" align=\"left\">
       ".$echo['email']."
       <td width=\"203\" height=\"15\" align=\"left\">

      <input type=text name=email size=\"20\">

      </tr>
      <tr>
       <td width=\"18\" valign=\"top\" height=\"15\">
       <td width=\"628\" height=\"15\" align=\"left\" colspan=\"3\">
       &nbsp;

      </tr>
      <tr>
       <td width=\"18\" valign=\"top\" height=\"15\">
       <td       width=\"628\" height=\"15\" align=\"left\" colspan=\"3\">
       <input type=submit value=\"".$echo['submit']."\">
      </tr>
      <input type=hidden name=action value=dosend>
      <tr>
      <td width=\"18\" height=\"27\">
      <td width=\"632\" height=\"27\" colspan=\"3\">
      </tr></table></form>";
echofooter();

}

////////////////////////////////////////////////////////
// Function:       makeRandomPassword Version: 1.0
// Description: Make a random password
function if(!function_exists('makerandompassword')){
  here comes the function
} {
$salt = "abchefghjkmnpqrstuvwxyz0123456789";
$pass = "";
srand((double)microtime()*1000000);
  $i = 0;
  while ($i <= 7) {
    $num = rand() % 33;
    $tmp = substr($salt, $num, 1);
    $pass = $pass . $tmp;
    $i++;
  }
  return $pass;
}

?>
beenz
 
Posts: 26
Joined: Wed Mar 04, 2009 10:29 pm

Postby FI-DD » Fri Mar 20, 2009 10:58 am

Oh, your modifications look really bad. :wink:

To make thing easier I updated the script. Please redownload it from the first post.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby cablegunmaster » Wed May 06, 2009 2:16 pm

Parse error: parse error in C:\xampp\htdocs\cablegunmaster.nlV2\cnr\lostpass.php on line 88

is what happened when I tried to install this script.
I cant seem to find the misstake.

Line 88 from the lostpass script.
Code: Select all
if(!function_exists('makeRandomPassword'){

Index.php where my login screen is:
Code: Select all
<table border="0" cellspacing="0" cellpadding="2">
<form name="login" action="cnr/index.php" method="post" onsubmit="return process_form(this)">
  <tr>
   <td width="55">Username:
   <td><input tabindex="1" type="text" name="username" value="<?=$lastusername; ?>" style="width:134">
  <tr>
   <td>Password:
   <td><input type="password" name="password" style="width:134">
  <tr>
   <td><a href="index.php?do=register">[Register]</a>
   <td><a href="<?=$config_http_script_dir; ?>/lostpass.php?action=showlostpass">[Recover pass]</a>
   <input accesskey="s" type="submit" style="width:60;" value="Log in">
  <tr>
   <td align="center" colspan="3"><?=$result; ?></td>
  </tr>
<input type="hidden" name="action" value="dologin">
</form>
</table>



Trying this script for the first time ^^.
But the error keeps coming up.
I havent changed anything on the installation.

Thusfar installed the registermod that works fine :)
only the recover pass fails working.

It seems like a relative easy script. :?

but I never seem to get mail scripts working in the first place. :oops:


SMTP secured script needed for it :oops: .
Thats what my webhost says. not sure what to change to make it send secured msgs.
cablegunmaster
 
Posts: 34
Joined: Tue May 05, 2009 9:31 am

Postby FI-DD » Tue May 12, 2009 3:29 pm

Sorry, there was a mistake in the code. It's fixed now. Please download it again.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Thanks :)

Postby cablegunmaster » Wed May 13, 2009 6:22 am

FI-DD wrote:Sorry, there was a mistake in the code. It's fixed now. Please download it again.


Thanks but im addepting it so it can use my SMTP Script. :P
see cablegunmaster.nl for the script :)


alsoo... with loginbox.php you forgot to unset cookies :) not all cookies have been unset when you press logout.
and the session you make can not be used in cutenewsfolder/index.php so it had to be set to true :)

but its easy adeptable :) Good work.
I like the script cause its clear coded. and doessnt give me allot of WTF's :wink:
cablegunmaster
 
Posts: 34
Joined: Tue May 05, 2009 9:31 am

Postby typeman » Mon Oct 26, 2009 1:29 pm

Hey,

I'm trying to incorporate this into my website, yet I can't seem to get it working 100%. I don't have any of the errors posted above, but I have trouble when submitting the completed form.

I fill in all the correct details (and to test, the wrong details) and when I click on the submit button, the screen refreshes with no message saying an email has been sent. So i presume this is normal and can be something that has to be added in manually. I checked my inbox for the new password, and no email was sent.

Could someone help me? :)
typeman
 
Posts: 102
Joined: Sat Oct 17, 2009 7:38 am

Next

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron