Recuperar contraseña

#1
Hola gente como estan, creo este POST para pedir la ayuda de todos quiero modificar el modulo Recovery password para que al momento de enviar el correo pida el ID de la cuenta con eso se podria lograr que los usuarios puedan registrarse con el mismo correo en varias cuentas gracias.
 

Mon

Administrator
Developer
#3
class.account.php
public function passwordRecoveryProcess($user_id, $user_email, $ip_address) {
if(!check_value($user_id)) throw new Exception(lang('error_23',true));
if(!check_value($user_email)) throw new Exception(lang('error_30',true));
if(!check_value($ip_address)) throw new Exception(lang('error_30',true));
if(!Validator::User($user_id)) throw new Exception(lang('error_30',true));
if(!Validator::Email($user_email)) throw new Exception(lang('error_30',true));
if(!Validator::Ip($ip_address)) throw new Exception(lang('error_30',true));

if(!$this->emailExists($user_email)) throw new Exception(lang('error_30',true));

//$user_id = $this->retrieveUserIDbyEmail($user_id);
if(!check_value($user_id)) throw new Exception(lang('error_23',true));

forgotpassword.php
# form submit
if(check_value($_POST['webengineUser_submit'])) {
try {
$Account = new Account($dB, $dB2);
$Account->passwordRecoveryProcess($_POST['webengineUser_current'], $_SERVER['REMOTE_ADDR']);
} catch (Exception $ex) {
message('error', $ex->getMessage());
}
}

else {

# form submit
if(check_value($_POST['webengineEmail_submit'])) {
try {
$Account = new Account($dB, $dB2);
$Account->passwordRecoveryProcess($_POST['webengineEmail_current'], $_SERVER['REMOTE_ADDR']);
} catch (Exception $ex) {
message('error', $ex->getMessage());
}
}

echo '<div class="col-xs-8 col-xs-offset-2" style="margin-top:30px;">';
echo '<form class="form-horizontal" action="" method="post">';
echo '<div class="form-group">';
echo '<label for="webengineEmail" class="col-sm-4 control-label">'.lang('register_txt_1',true).'</label>';
echo '<div class="col-sm-8">';
echo '<input type="text" class="form-control" id="webengineEmail" name="webengineUser_current" required>';
echo '</div>';
echo '</div>';
echo '<div class="form-group">';
echo '<label for="webengineEmail" class="col-sm-4 control-label">'.lang('forgotpass_txt_1',true).'</label>';
echo '<div class="col-sm-8">';
echo '<input type="text" class="form-control" id="webengineEmail" name="webengineEmail_current" required>';
echo '</div>';
echo '</div>';
echo '<div class="form-group">';
echo '<div class="col-sm-offset-4 col-sm-8">';
echo '<button type="submit" name="webengineEmail_submit" value="submit" class="btn btn-primary">'.lang('forgotpass_txt_2',true).'</button>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
}
}
} catch(Exception $ex) {
message('error', $ex->getMessage());
}
 
Top