Email de recuperación
This commit is contained in:
parent
f36bc0afdf
commit
5b50b3cc64
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.405.1) stable; urgency=low
|
||||
hedera-web (1.405.2) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
<db-form id="user-form">
|
||||
<db-model property="model" id="user-model" updatable="true">
|
||||
<custom>
|
||||
SELECT u.id, u.name, u.recoverPass,
|
||||
c.email, c.mail, c.user_id
|
||||
SELECT u.id, u.name, u.email, u.recoverPass, c.mail, c.user_id
|
||||
FROM account.userView u
|
||||
LEFT JOIN customer_view c
|
||||
ON u.id = c.user_id
|
||||
|
|
|
@ -9,14 +9,11 @@ class RecoverPassword extends Vn\Web\JsonRequest
|
|||
function run ($db)
|
||||
{
|
||||
$user = $db->getRow (
|
||||
'SELECT c.`e-mail` mail, u.active
|
||||
FROM vn2008.Clientes c
|
||||
JOIN account.user u ON u.id = c.Id_Cliente
|
||||
WHERE u.name = #',
|
||||
'SELECT email, active FROM account.user WHERE name = #',
|
||||
[$_REQUEST['recoverUser']]
|
||||
);
|
||||
|
||||
if (!($user['active'] && $user['mail']))
|
||||
if (!($user['active'] && $user['email']))
|
||||
return TRUE;
|
||||
|
||||
$service = $this->service;
|
||||
|
@ -24,7 +21,7 @@ class RecoverPassword extends Vn\Web\JsonRequest
|
|||
$url = $service->getUrl () ."#!form=account/conf&token=$token";
|
||||
|
||||
$report = new Vn\Web\Report ($db, 'recover-password', ['url' => $url]);
|
||||
$report->sendMail ($user['mail']);
|
||||
$report->sendMail ($user['email']);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -290,6 +290,8 @@ abstract class Service
|
|||
|
||||
Locale::addPath ('rest/'. dirname ($_REQUEST['method']));
|
||||
|
||||
$res = NULL;
|
||||
|
||||
try {
|
||||
$res = $method->run ($methodDb);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue