Overview
Comment: | Corrige bug "UNIQUE constraint failed: membres.email" lors de l'import de CSV |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5160efccc2373d4055aa040468d8b116 |
User & Date: | bohwaz on 2018-11-26 22:51:55 |
Other Links: | manifest | tags |
Context
2018-11-26
| ||
23:36 | Inclusion fichier manquant check-in: ad366685a4 user: bohwaz tags: trunk | |
22:54 | Merge avec trunk check-in: 6e79e54ca7 user: bohwaz tags: dev | |
22:51 | Corrige bug "UNIQUE constraint failed: membres.email" lors de l'import de CSV check-in: 5160efccc2 user: bohwaz tags: trunk | |
2018-11-16
| ||
16:33 | Permettre de fusionner/mettre à jour des membres existants en utilisant le numéro de membre check-in: 62eedbbe38 user: bohwaz tags: trunk | |
Changes
Modified src/include/lib/Garradin/Membres.php from [3d4bebf63e] to [b2dcaceab5].
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 | { $data[$key] = 0; } } elseif ($config->type == 'email') { $data[$key] = strtolower($data[$key]); } elseif ($config->type == 'select' && !in_array($data[$key], $config->options)) { throw new UserException('Le champ "' . $config->title . '" ne correspond pas à un des choix proposés.'); } elseif ($config->type == 'multiple') { | > > > > > | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | { $data[$key] = 0; } } elseif ($config->type == 'email') { $data[$key] = strtolower($data[$key]); if (!SMTP::checkEmailIsValid($data[$key], false)) { throw new UserException(sprintf('Adresse email invalide "%s" pour le champ "%s".', $data[$key], $config->title)); } } elseif ($config->type == 'select' && !in_array($data[$key], $config->options)) { throw new UserException('Le champ "' . $config->title . '" ne correspond pas à un des choix proposés.'); } elseif ($config->type == 'multiple') { |
︙ | ︙ | |||
158 159 160 161 162 163 164 | { throw new UserException('Ce numéro de membre est déjà attribué à un autre membre.'); } } $this->_checkFields($data, true, $require_password); | | | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | { throw new UserException('Ce numéro de membre est déjà attribué à un autre membre.'); } } $this->_checkFields($data, true, $require_password); if (isset($data[$id]) && $db->test('membres', $id . ' = ? COLLATE NOCASE', $data[$id])) { throw new UserException('La valeur du champ '.$id.' est déjà utilisée par un autre membre, hors ce champ doit être unique à chaque membre.'); } if (isset($data['passe']) && trim($data['passe']) != '') { $data['passe'] = self::hashPassword($data['passe']); |
︙ | ︙ |