changeset 59:595ff0134cd9 draft

Skip creation of user which is already registered.
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 25 Jun 2012 12:29:29 +0900
parents d5650f7361d9
children 592d958cab58
files after5.rb
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/after5.rb	Mon Jun 25 12:28:50 2012 +0900
+++ b/after5.rb	Mon Jun 25 12:29:29 2012 +0900
@@ -4,7 +4,7 @@
 # Associative Scheduling Table - after5
 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org]
 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $
-# Last modified Mon Jun 25 12:28:01 2012 on firestorm
+# Last modified Mon Jun 25 12:28:29 2012 on firestorm
 # See http://www.gentei.org/~yuuji/software/after5/
 # このスクリプトはEUCで保存してください。
 $hgid = <<_HGID_.split[1..-2].join(" ")
@@ -3757,6 +3757,10 @@
     prohibitviahttp()
     pm = open_pm()
     exit 1 unless pm
+    if pm.userexist?(user)
+      printf("User %s already exists.  Skip.\n", user)
+      exit 1
+    end
     email = nil
     if /(.*@.*)=(.*@.*)/ =~ user
       user, email = $1, $2

yatex.org