Esempio n. 1
0
 public function confirm($arguments)
 {
     if (Session::isLoggedIn()) {
         return Error::set(self::ERR_LOGGED_IN);
     }
     if (empty($arguments[0])) {
         return Error::set(self::ERR_NO_LOST_ID);
     }
     if (empty($arguments[1]) || $arguments[1] != 'auth' && $arguments[1] != 'password') {
         return Error::set(self::ERR_INIVALID_MODE);
     }
     $passReset = new passwordReset(ConnectionFactory::get('redis'));
     $info = $passReset->get($arguments[0], $arguments[1] == 'auth' ? true : false);
     if (is_string($info)) {
         return Error::set($info);
     }
     $users = new users(ConnectionFactory::get('mongo'));
     if ($arguments[1] == 'auth') {
         $users->changeAuth($info[1], true, false, false, false);
         $this->view['password'] = false;
     } else {
         $password = $users->resetPassword($info[1]);
         $this->view['password'] = $password;
     }
 }
Esempio n. 2
0
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min">
	<link rel="stylesheet" type="text/css" href="css/style.css">

	</head>
	<body>

	
		
		    <div class="container">
		        <div class="card card-container">
		           <p id="profile-name" class="profile-name-card">please enter your email</p>
		           <?php 
if (isset($_POST['password_btn'])) {
    $mail = $_POST['mail'];
    $secret = $_POST['mysecret'];
    $users->resetPassword($mail, $secret);
}
?>
		            <form class="form-signin" action="" method="post">
		                <span id="secret" class="reauth-email"></span>
		                <input type="text" id="inputEmail" name="mysecret"  class="form-control" placeholder="Secret Answer" >
		                <span id="reauth-email" class="reauth-email"></span>
		                <input type="email" name="mail" id="inputEmail" class="form-control" name="mail" placeholder="Email address" required autofocus>
		                <button class="btn btn-lg btn-primary btn-block btn-signin" name="password_btn" type="submit">reset</button>
		            </form><!-- /form -->
		        </div><!-- /card-container -->
		    </div><!-- /container -->
	</body>

</html>
<?php

require_once "_admin/includes/config.php";
require_once "_admin/includes/class.php";
$userObj = new users();
$msg = NULL;
if (isset($_POST['submit'])) {
    $useremail = mysql_real_escape_string($_POST['user_email']);
    if ($userObj->getUserDetail($useremail)) {
        $newpass = $userObj->randomPassword();
        if ($userObj->resetPassword($useremail, $newpass)) {
            //$headers = "From: <*****@*****.**>";
            //$subject = "Password for Bumblebee Wireless Sell It Account";
            $mlmsg = '<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
    <tr>
        <td align="center" valign="top" style="padding:30px 0 20px 0">
            <table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="800" style="border-top:5px solid #ffe115; border-bottom:5px solid #ffe115;">
                <tr>
                    <td valign="top">
                        <a href="http://bumblebeewireless.com/" style="color:#1E7EC8;"><img src="http://bumblebeewireless.com/sell-it/images/email.jpg"  alt="Bumblebee Wireless" border="0"/></a>
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Reset Password,</h1>
                        <p style="font-size:12px; line-height:16px; margin:0 0 8px 0;">You have indicated that you have forgotten your password for the member profile associative with ' . $useremail . '<strong><br><br>Your new password is:</strong> ' . $newpass . '</p>
                     </td>
                </tr>
				 <tr>
                    <td valign="top">
                        <a href="http://bumblebeewireless.com/sell-it/login.php"  style="background:#3b91cf; border: 1px solid #3b91cf; border-radius: 5px; clear: both; color: #fff; display: inline-block; font: bold 18px/32px calibri; height: 32px; margin: 10px 0px; width:200px; text-decoration:none; text-align:center; padding: 0px;">login To Your Account</a>