projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make_hook alignement.
[platal.git]
/
modules
/
platal.php
diff --git
a/modules/platal.php
b/modules/platal.php
index
3be5bc1
..
11b6b85
100644
(file)
--- a/
modules/platal.php
+++ b/
modules/platal.php
@@
-229,6
+229,7
@@
class PlatalModule extends PLModule
$page->changeTpl('platal/password.tpl');
$page->setTitle('Mon mot de passe');
$page->changeTpl('platal/password.tpl');
$page->setTitle('Mon mot de passe');
+ $page->assign('do_auth', false);
}
function handler_smtppass($page)
}
function handler_smtppass($page)
@@
-275,7
+276,7
@@
class PlatalModule extends PLModule
return;
}
return;
}
- if (!
ereg('[0-3][0-9][0-1][0-9][1][9]([0-9]{2})
', Env::v('birth'))) {
+ if (!
preg_match('/^[0-3][0-9][0-1][0-9][1][9]([0-9]{2})$/
', Env::v('birth'))) {
$page->trigError('Date de naissance incorrecte ou incohérente');
return;
}
$page->trigError('Date de naissance incorrecte ou incohérente');
return;
}
@@
-343,8
+344,7
@@
Email envoyé à ".Env::v('login') . (Post::has('email') ? "
Adresse de secours : " . Post::v('email') : ""));
$mymail->send();
Adresse de secours : " . Post::v('email') : ""));
$mymail->send();
- // on cree un objet logger et on log l'evenement
- S::logger($user->id())->log('recovery', $mails);
+ S::logger($user->id())->log('recovery', is_null($to) ? $inactives_to . ', ' . $user->bestEmail() : $to);
}
function handler_tmpPWD($page, $certif = null)
}
function handler_tmpPWD($page, $certif = null)
@@
-383,9
+383,20
@@
Adresse de secours : " . Post::v('email') : ""));
}
S::logger($uid)->log("passwd", "");
}
S::logger($uid)->log("passwd", "");
+
+ // Try to start a session (so the user don't have to log in); we will use
+ // the password available in Post:: to authenticate the user.
+ Platal::session()->start(AUTH_MDP);
+
$page->changeTpl('platal/tmpPWD.success.tpl');
} else {
$page->changeTpl('platal/tmpPWD.success.tpl');
} else {
+ $hruid = XDB::fetchOneCell('SELECT hruid
+ FROM accounts
+ WHERE uid = {?}',
+ $uid);
$page->changeTpl('platal/password.tpl');
$page->changeTpl('platal/password.tpl');
+ $page->assign('hruid', $hruid);
+ $page->assign('do_auth', true);
}
}
}
}