username = $uArray['username']; $this->useremail = $uArray['useremail']; $this->userpasswd = $uArray['userpasswd']; $this->actstate = 0; $this->regip = $uArray['clientip']; $this->intime = time(); $this->salt = $uArray['salt']; return $this->insert(); } /** * * @param type $param */ public function getAll($limit) { return $this->find(array('select' => 'id,username,mobile,useremail,lastloginip,lastlogintime', 'desc' => 'regdate', 'limit' => $limit, 'asArray' => TRUE)); } /** * * @param type $param */ public function getCountz() { return $this->count(); } /** * * @param type $param */ public function updateBank($uid, $money) { $this->bank = new DooDbExpression('bank+' . $money); return $this->update(array('where' => 'id=' . $uid)); } public function getRowByUid($uid) { if (empty($uid)) return false; return $this->find(array('select' => 'bank,username,useremail', 'where' => 'id=' . $uid, 'asArray' => TRUE)); } public function getRowByMobile($mobile) { return $this->getOne(array('where' => 'mobile="' . $mobile . '"', 'asArray' => TRUE)); } public function getRowByName($name) { return $this->getOne(array('where' => 'username="' . $name . '"', 'asArray' => TRUE)); } public function getRowByid($uid) { return $this->getOne(array('select' => 'mobile,useremail', 'where' => 'id=' . $uid, 'asArray' => TRUE)); } public function getidBysearch($search) { return $this->getOne(array('select' => 'id' ,'where' => 'username=? or useremail=? or mobile=?', 'param' => array($search,$search,$search), 'asArray' => TRUE)); } } ?>