fix ticket #72.

This commit is contained in:
wlx 2009-03-20 07:42:52 +00:00
parent d48eaeab2e
commit 96eaec5b66
1 changed files with 4 additions and 4 deletions

View File

@ -66,11 +66,11 @@ class Admin_DataController extends Zend_Controller_Action
$sql="select * from geonetworkusers where id=?"; $sql="select * from geonetworkusers where id=?";
$r=$this->db->fetchRow($sql,array($row->id)); $r=$this->db->fetchRow($sql,array($row->id));
if ($r) { if ($r) {
$sql="update geonetworkusers set username=?,password=?,email=?"; $sql="update geonetworkusers set username='$row->username',password='$row->password',email='$row->email' where id=$row->id";
$this->db->query($sql,array($row->username,$row->password,$row->email)); $this->db->query($sql);
} else { } else {
$sql="insert into geonetworkusers (id,username,password,email) values(?,?,?,?)"; $sql="insert into geonetworkusers (id,username,password,email) values($row->id,'$row->username','$row->password','$row->email')";
$this->db->query($sql,array($row->id,$row->username,$row->password,$row->email)); $this->db->query($sql);
} }
} }
$this->view->msg='已成功同步管理员帐号!'; $this->view->msg='已成功同步管理员帐号!';