X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fadmin.php;h=509a15ec8910814460904f696b3b67c540a3af6e;hb=100e66fc8ab2b48621b287d50079558d83187278;hp=f5ec9423f984b0aa9f7945777d99f4500d407894;hpb=e02d9fbb5137c96382a896a6ea93413e79f0733d;p=platal.git diff --git a/modules/admin.php b/modules/admin.php index f5ec942..509a15e 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -40,7 +40,6 @@ class AdminModule extends PLModule 'admin/postfix/whitelist' => $this->make_hook('postfix_whitelist', AUTH_MDP, 'admin'), 'admin/mx/broken' => $this->make_hook('mx_broken', AUTH_MDP, 'admin'), 'admin/skins' => $this->make_hook('skins', AUTH_MDP, 'admin'), - 'admin/synchro_ax' => $this->make_hook('synchro_ax', AUTH_MDP, 'admin'), 'admin/user' => $this->make_hook('user', AUTH_MDP, 'admin'), 'admin/add_accounts' => $this->make_hook('add_accounts', AUTH_MDP, 'admin'), 'admin/validate' => $this->make_hook('validate', AUTH_MDP, 'admin'), @@ -653,18 +652,6 @@ class AdminModule extends PLModule return null; } - private static function getMatricule($mat) - { - $year = intval(substr($mat, 0, 3)); - $rang = intval(substr($mat, 3, 3)); - if ($year > 200) { $year /= 10; }; - if ($year < 96) { - return null; - } else { - return sprintf('%04u%04u', 1900+$year, $rang); - } - } - private static function formatNewUser($infosLine, $separator, $promo, $size) { $infos = explode($separator, $infosLine); @@ -753,7 +740,7 @@ class AdminModule extends PLModule && ($sex = self::formatSex($page, $infos[3], $line))) { $name = $infos[1] . ' ' . $infos[0]; $birthDate = self::formatBirthDate($infos[2]); - $xorgId = self::getMatricule($infos[4]); + $xorgId = Profile::getXorgId($infos[4]); XDB::execute('INSERT INTO profiles (hrpid, xorg_id, ax_id, birthdate_ref, sex) VALUES ({?}, {?}, {?}, {?})',