X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetgrp.php;h=89605243291a1e01f89ee8acbcc124a367083896;hb=07c1b4bc8ebf1ec9d358ec8897a89287378acd63;hp=39001e47d25cb6e89f73cb6f1c32c4b4f20ef2e5;hpb=673e56aa757fce4ea57c27ab2c0d5ce87d713e51;p=platal.git diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 39001e4..8960524 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -374,6 +374,7 @@ class XnetGrpModule extends PLModule $view = new UserSet(new UFC_Group($globals->asso('id'), $admins)); $view->addMod('groupmember', 'Annuaire'); $view->addMod('trombi', 'Trombinoscope'); + $view->addMod('map', 'Planisphère'); $view->apply('annuaire', $page, $action); $page->assign('only_admin', $admins); $page->changeTpl('xnetgrp/annuaire.tpl'); @@ -1217,19 +1218,23 @@ class XnetGrpModule extends PLModule } XDB::query('UPDATE accounts SET full_name = {?}, directory_name = {?}, display_name = {?}, - firstname = {?}, lastname = {?}, sex = {?}, email = {?}, type = {?} + firstname = {?}, lastname = {?}, sex = {?}, type = {?} WHERE uid = {?}', $full_name, $directory_name, Post::t('display_name'), $firstname, $lastname, - (Post::t('sex') == 'male') ? 'male' : 'female', Post::t('email'), + (Post::t('sex') == 'male') ? 'male' : 'female', (Post::t('type') == 'xnet') ? 'xnet' : 'virtual', $user->id()); - } else if (!$user->perms && Post::has('email') && require_email_update($user, Post::t('email'))) { + } + + // Updates email. + $new_email = strtolower(Post::t('email')); + if (!$user->perms && require_email_update($user, $new_email)) { XDB::query('UPDATE accounts SET email = {?} WHERE uid = {?}', - Post::t('email'), $user->id()); + $new_email, $user->id()); $listClient = new MMList(S::user()); - $listClient->change_user_email($user->forlifeEmail(), Post::t('email')); - update_alias_user($user->forlifeEmail(), Post::t('email')); + $listClient->change_user_email($user->forlifeEmail(), $new_email); + update_alias_user($user->forlifeEmail(), $new_email); } if (XDB::affectedRows()) { $page->trigSuccess('Données de l\'utilisateur mises à jour.');