Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Password Change

Discussion in 'E-mail Discussion' started by marbles1704, Oct 7, 2010.

  1. marbles1704

    marbles1704 Member

    Joined:
    Jan 15, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Hello,
    Is there a way to allow users to change their passwords without logging in to cpanel. I found something on google but not working ..


    PHP:
    <html>
    <body>
    <form name="input" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    Email:<br />
    <input type="text" name="email" />@example.com<br />
    Password:<br />
    <input type="password" name="pass" /><br />
    New Password:<br />
    <input type="password" name="newpass" /><br />
    <input type="password" name="newpass2" /><br />
    <input type="submit" value="Submit" />
    </form>
    <br />
    <?php

    $username 
    $_POST['email'];
    $password $_POST['pass'];
    $cpaneldomain 'example.com';
    $email $_POST['email'];
    $emaildomain 'example.com';
    $newpass $_POST['newpass'];

    if(
    $_POST['newpass']=="")
    {
    echo 
    "";
    }
    else if(
    $_POST['newpass']==$_POST['newpass2'])
    {
    echo 
    "New password submitted.";
    @
    file("http://$username@$emaildomain:$password@$cpaneldomain:2095/webmail/x/mail/dopasswdpop.html?redirectdomain=&email=$email&domain=$emaildomain&password=$newpass");
    }
    else
    {
    echo 
    "The two new password fields must be the same.";
    }
    ?>
    </body>
    </html>
     
  2. marbles1704

    marbles1704 Member

    Joined:
    Jan 15, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    checked everything ok .. but still not working :(
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice