Commit 27b86fa1 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Don't add the email/user to netidmap_table if it has already been added (#1163)

parent 39e3006a
......@@ -123,7 +123,15 @@ sub set_netidtoemail_db {
q{INSERT INTO netidmap_table
(netid_netidmap, serviceid_netidmap, email_netidmap,
robot_netidmap)
VALUES (?, ?, ?, ?)},
SELECT ?, ?, ?, ?
FROM dual
WHERE NOT EXISTS (
SELECT 1
FROM netidmap_table
WHERE netid_netidmap = ? AND serviceid_netidmap = ? AND
email_netidmap = ? AND robot_netidmap = ?
)},
$netid, $idpname, $email, $robot,
$netid, $idpname, $email, $robot
)
) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment