- if (!ttValidString($cl_password1)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.password'));
- if (!ttValidString($cl_password2)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password'));
- if ($cl_password1 !== $cl_password2)
- $err->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password'));
- }
- if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email'));
- // Finished validating user input.
-
- if ($err->no()) {
- if (ttUserHelper::update($user->id, array(
- 'name' => $cl_name,
- 'login' => $cl_login,
- 'password' => $cl_password1,
- 'email' => $cl_email,
- 'status' => ACTIVE))) {
- header('Location: admin_teams.php');
- exit();
- } else {
- $err->add($i18n->getKey('error.db'));
+ if (!ttValidString($cl_password1))
+ $err->add($i18n->get('error.field'), $i18n->get('label.password'));
+ if (!ttValidString($cl_password2))
+ $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password'));
+ if ($cl_password1 !== $cl_password2)
+ $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password'));