fixed bug in Westdc/User/Account

This commit is contained in:
Jianxuan Li 2015-01-13 11:21:11 +08:00
parent 4d8bc7cdd9
commit 9d68652990
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ use Westdc\User\Member;
class Account implements EventManagerAwareInterface
{
public $memberTable = "tbl_member";
public $memberTable = "users";
public $FieldUsername = "username";
public $FieldPasword = "password";
public $FieldLastlogin = "ts_last_login";
@ -64,12 +64,12 @@ class Account implements EventManagerAwareInterface
{
if(is_string($id))
$sql = "SELECT * FROM {$this->conf->table->member} WHERE username='$id'";
$sql = "SELECT * FROM ".$this->memberTable." WHERE username='$id'";
elseif(is_numeric($id))
{
if($id == 0)
$id == view::User('id');
$sql = "SELECT * FROM {$this->conf->table->member} WHERE id=$id";
$sql = "SELECT * FROM {$this->memberTable} WHERE id=$id";
}
$rs = $this->db->query($sql);