Tatsuki SUGIURA
sugi****@users*****
2006年 7月 14日 (金) 14:39:43 JST
Index: slashjp/Slash/DB/MySQL/MySQL.pm diff -u slashjp/Slash/DB/MySQL/MySQL.pm:1.11 slashjp/Slash/DB/MySQL/MySQL.pm:1.12 --- slashjp/Slash/DB/MySQL/MySQL.pm:1.11 Wed Jul 12 21:24:21 2006 +++ slashjp/Slash/DB/MySQL/MySQL.pm Fri Jul 14 14:39:43 2006 @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: MySQL.pm,v 1.11 2006/07/12 12:24:21 sugi Exp $ +# $Id: MySQL.pm,v 1.12 2006/07/14 05:39:43 sugi Exp $ package Slash::DB::MySQL; use strict; @@ -15,12 +15,13 @@ use URI (); use Slash::Custom::ParUserAgent; use vars qw($VERSION $_proxy_port); -use Encode; use base 'Slash::DB'; use base 'Slash::DB::Utility'; use Slash::Constants ':messages'; +use Encode; +use Slash::LDAPDB; -($VERSION) = ' $Revision: 1.11 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.12 $ ' =~ /\$Revision:\s+([^\s]+)/; # Fry: How can I live my life if I can't tell good from evil? @@ -2247,6 +2248,7 @@ }); my $rows = $self->sqlDelete("users_param", "uid=$uid"); $self->setUser_delete_memcached($uid); + #Slash::LDAPDB->new()->deletUserByUid($uid); # do NOT delete entry. just remove site data... return $rows; } @@ -3087,13 +3089,14 @@ $self->sqlDo("SET AUTOCOMMIT=0"); + my $passwd = encryptPassword(changePassword()); $self->sqlInsert("users", { uid => undef, realemail => $email, nickname => $newuser, matchname => $matchname, seclev => 1, - passwd => encryptPassword(changePassword()) + passwd => $passwd, }); my $uid = $self->getLastInsertId({ table => 'users', prime => 'uid' }); @@ -3149,6 +3152,13 @@ $self->sqlDo("COMMIT"); $self->sqlDo("SET AUTOCOMMIT=1"); + Slash::LDAPDB->new()->createUser($matchname, { + realemail => $email, + nickname => $newuser, + passwd => $passwd, + uid => $uid, + }); + $self->setUser_delete_memcached($uid); return $uid; @@ -12012,6 +12022,8 @@ $mcd_need_delete = 1 if $rows; $self->setUser_delete_memcached($uid) if $mcd_need_delete; + Slash::LDAPDB->new()->setUserByUid($uid, $hashref); + return $rows; }