if (Post::t('comment') != $user->comment) {
$to_update['comment'] = Post::blank('comment') ? null : Post::t('comment');
}
- if (require_email_update($user, Post::t('email'))) {
- $to_update['email'] = Post::t('email');
- $listClient->change_user_email($user->forlifeEmail(), Post::t('email'));
- update_alias_user($user->forlifeEmail(), Post::t('email'));
+ $new_email = strtolower(Post::t('email'));
+ if (require_email_update($user, $new_email)) {
+ $to_update['email'] = $new_email;
+ $listClient->change_user_email($user->forlifeEmail(), $new_email);
+ update_alias_user($user->forlifeEmail(), $new_email);
}
}
if (!empty($to_update)) {
$page->changeTpl('admin/add_accounts.tpl');
if (Env::has('add_type') && Env::has('people')) {
+ static $titles = array('male' => 'M', 'female' => 'MLLE');
$lines = explode("\n", Env::t('people'));
$separator = Env::t('separator');
$promotion = Env::i('promotion');
continue;
}
- XDB::execute('INSERT INTO profiles (hrpid, xorg_id, ax_id, birthdate_ref, sex)
- VALUES ({?}, {?}, {?}, {?}, {?})',
- $infos['hrid'], $xorgId, (isset($infos[5]) ? $infos[5] : null), $birthDate, $sex);
+ XDB::execute('INSERT INTO profiles (hrpid, xorg_id, ax_id, birthdate_ref, sex, title)
+ VALUES ({?}, {?}, {?}, {?}, {?}, {?})',
+ $infos['hrid'], $xorgId, (isset($infos[5]) ? $infos[5] : null),
+ $birthDate, $sex, $titles[$sex]);
$pid = XDB::insertId();
XDB::execute('INSERT INTO profile_public_names (pid, lastname_initial, lastname_main, firstname_initial, firstname_main)
VALUES ({?}, {?}, {?}, {?}, {?})',