#1  
Old 23rd December 2006, 12:05
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Default Adding Features

How could i add a "Forgott My Password" buton, i know how i would send emails via php but how would i get the users password,username,email. As i would like to have it when you press forgott by password it asks for the username and sends it there password to the users email

i would have a phpscript something like this:
PHP Code:
<?php
$username 
$_POST['user'];
$password "HOW DO I GET USERS PASS";
$email "HOW DO I GET USERS EMAIL";

$message "Hello, \n You have requested your password: 2\n  Your Password is: ".$password;
mail($email'Forgotten Password'$message);

?>
Reply With Quote
Sponsored Links
  #2  
Old 23rd December 2006, 12:25
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,768
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

Are you talking about the client or reseller password or the password of a email user account?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 23rd December 2006, 12:27
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Default

Yep, the clients password
Reply With Quote
  #4  
Old 23rd December 2006, 12:33
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,768
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

All clients and reseller passwords are stored md5 encrypted in the database table sys_user, so you can not get the original password back. I recommend to create a new password instead and send this newly created password to the client.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 23rd December 2006, 12:41
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Default

Thanks, how would i save the users changed password? And find form the username there email address
Thanks again

Heres my script that should work, just needs a few more varibles
PHP Code:
<?php
// Make Password
$salt "abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789"
srand((double)microtime()*1000000); // start the random generator
$password=""// set the inital variable
for ($i=0;$i<6;$i++)  $password $password substr ($saltrand() % strlen($salt), 1);

// Varibles
$newpass md5($password);
$username $_POST['user'];
$email "???";

$message "Hello, \n You have we have automatically changed your password as you appear to have forgooten it: 2\n  Your New Password is: ".$newpass;
mail($email'Forgotten Password'$message);

?>
Reply With Quote
  #6  
Old 23rd December 2006, 13:21
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,768
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

I guess you mix up client paswords with email passwords. Client passwords are not encrypted with crypt and clients do not nescesarily have a email address, clients are referenced by their username, the clients email address is optional.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 23rd December 2006, 13:24
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
 
Default

I think ill just leave this then, sounds like it wouldnt work easily
thanks anyway
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem adding a user account bobsta63 General 7 30th November 2006 09:42
Creating image with Systemimager cuongtim HOWTO-Related Questions 3 18th November 2006 13:55
Several errors and ideas for features jmroth Feature Requests 16 6th March 2006 05:39
Adding new ip's to server phamels Installation/Configuration 4 18th October 2005 09:06
disable webmail,MYsql Database features gg234 Installation/Configuration 2 14th September 2005 02:56


All times are GMT +2. The time now is 11:13.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.