<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4614 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4615 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
$auth->doLogout();
+// Access checks.
$cl_ref = $request->getParameter('ref');
if (!$cl_ref || $auth->isPasswordExternal()) {
header('Location: login.php');
exit();
}
-
-// Get user ID.
$user_id = ttUserHelper::getUserIdByTmpRef($cl_ref);
-if ($user_id) {
- $user = new ttUser(null, $user_id); // Note: reusing $user from initialize.php.
- // In case user language is different - reload $i18n.
- if ($i18n->lang != $user->lang) {
- $i18n->load($user->lang);
- $smarty->assign('i18n', $i18n->keys);
- }
- if ($user->custom_logo) {
- $smarty->assign('custom_logo', 'images/'.$user->group_id.'.png');
- $smarty->assign('mobile_custom_logo', '../images/'.$user->group_id.'.png');
- }
- $smarty->assign('user', $user);
+if (!$user_id) {
+ header('Location: access_denied.php'); // No user found by provided reference.
+ exit();
+}
+// End of access checks.
+
+$user = new ttUser(null, $user_id); // Note: reusing $user from initialize.php.
+// In case user language is different - reload $i18n.
+if ($i18n->lang != $user->lang) {
+ $i18n->load($user->lang);
+ $smarty->assign('i18n', $i18n->keys);
+}
+if ($user->custom_logo) {
+ $smarty->assign('custom_logo', 'images/'.$user->group_id.'.png');
+ $smarty->assign('mobile_custom_logo', '../images/'.$user->group_id.'.png');
}
+$smarty->assign('user', $user);
$cl_password1 = $request->getParameter('password1');
$cl_password2 = $request->getParameter('password2');
exit();
}
+$cl_login = $request->getParameter('login');
+
$form = new Form('resetPasswordForm');
-$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','style'=>'width: 300px;'));
+$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','style'=>'width: 300px;','value'=>$cl_login));
$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.reset_password')));
if ($request->isPost()) {
- $cl_login = $request->getParameter('login');
-
// Validate user input.
if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login'));