Add "Change Password" link to SquirrelMail login page (CODE INCLUDED)

SlashChick

Verified User
Joined
Oct 14, 2003
Messages
54
Hello,

I'd like to see this in a future DirectAdmin release.

I don't expect all of our customers to remember the CMD_CHANGE_EMAIL_PASSWORD link, so I've added a link to the bottom of the SquirrelMail login page that says, quite simply, "Change Your Email Password."

Here's how to add this to your server.

Edit your /var/www/html/squirrelmail/src/login.php file. Right before the
Code:
echo "</body>\n". 
     "</html>\n";
?>

(three lines before the bottom), add:

Code:
echo "<p align=\"center\"><a href=\"http://" . gethostbyaddr (gethostbyname
($SERVER_NAME)) . ":2222/CMD_CHANGE_EMAIL_PASSWORD\">Change Your Email
Password</a></p>";

So the bottom part of src/login.php should look like this:

Code:
do_hook('login_bottom');
echo "<p align=\"center\"><a href=\"http://" . gethostbyaddr (gethostbyname
($SERVER_NAME)) . ":2222/CMD_CHANGE_EMAIL_PASSWORD\">Change Your Email
Password</a></p>";
echo "</body>\n". 
     "</html>\n";
?>

This adds the simple link to change your password (and guesses your hostname properly.) Since it will probably get wiped out if you upgrade DA, I'd like to see this included by default.

Hope this helps!
 
SlashChick said:
This adds the simple link to change your password (and guesses your hostname properly.)
Nice, but add one caveat...

In your code, change http to https if you're using secure logins to your server.

You are using secure logins to your server, aren't you :eek: ?
Since it will probably get wiped out if you upgrade DA, I'd like to see this included by default.
I'd like to see it added by default as well, but the file didn't change since install, so I think it's safe from automatic upgrades.

Squirrelmail upgrades will definitely remove it, but of course you should realize that if you update Squirrelmail you'll have to recreate the change.

Can we get this moved to the How-To section?

Jeff
 
I may get some SM RPMS available soon that will include this, give me a couple of days to get everything sorted out :)

(Going to leave it here for now since it is actually a feature request!)

Chris
 
I leave it to your superior judgement, Chris, but in the meantime it's also a rather neat little How-To; it took me less than five minutes to implement.

Jeff
 
Back
Top