Merge branch 'development' of git.westgis.ac.cn:lijianxuan/westdc-core into development
This commit is contained in:
commit
2948bd00ac
|
@ -89,6 +89,10 @@ class Account extends AbstractEventManager implements ServiceManagerAwareInterfa
|
||||||
'password' => md5($data['password']),
|
'password' => md5($data['password']),
|
||||||
'usertype' => $this->RoleMember,
|
'usertype' => $this->RoleMember,
|
||||||
'email' => $data['email'],
|
'email' => $data['email'],
|
||||||
|
'realname' => $data['realname'],
|
||||||
|
'phone' => $data['phone'],
|
||||||
|
'unit' => $data['unit'],
|
||||||
|
'address' => $data['address']
|
||||||
];
|
];
|
||||||
|
|
||||||
// $dbh = new TableGateway($this->memberTable, Zend_Db::getInstance());
|
// $dbh = new TableGateway($this->memberTable, Zend_Db::getInstance());
|
||||||
|
@ -205,7 +209,10 @@ class Account extends AbstractEventManager implements ServiceManagerAwareInterfa
|
||||||
'password' => $request->getParam('password'),
|
'password' => $request->getParam('password'),
|
||||||
'confirm_password' => $request->getParam('confirm_password'),
|
'confirm_password' => $request->getParam('confirm_password'),
|
||||||
'email' => $request->getParam('email'),
|
'email' => $request->getParam('email'),
|
||||||
'realname' => $request->getParam('realname')
|
'realname' => $request->getParam('realname'),
|
||||||
|
'phone' => $request->getParam('phone'),
|
||||||
|
'unit' => $request->getParam('unit'),
|
||||||
|
'address' => $request->getParam('address')
|
||||||
);
|
);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|
|
@ -80,4 +80,23 @@ class Attachments extends AbstractEventManager implements ServiceManagerAwareInt
|
||||||
return $sql." DESC";
|
return $sql." DESC";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function upload($file)
|
||||||
|
{
|
||||||
|
$configService = $this->serviceManager->get('ConfigService');
|
||||||
|
$appConfig = $configService->get('application.ini');
|
||||||
|
|
||||||
|
$fileUploadService = $this->serviceManager->get('File/Upload');
|
||||||
|
$fileUploadService->attachDefaultListener();
|
||||||
|
$fileUploadService->setParams(['file_type' => 'file']);
|
||||||
|
|
||||||
|
$file_info = $fileUploadService($file,$appConfig['attachment_save_path'],"","",$fileUploadService::DATETIME_MODEL_Y);
|
||||||
|
|
||||||
|
if(isset($file_info['error']) && !empty($file_info['error']))
|
||||||
|
{
|
||||||
|
return array("error" => $file_info['error']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $file_info;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -78,7 +78,7 @@ class Account implements EventManagerAwareInterface
|
||||||
|
|
||||||
//注册
|
//注册
|
||||||
public function register($data)
|
public function register($data)
|
||||||
{var_dump($data);
|
{var_dump($data);exit;
|
||||||
$params = compact('data');
|
$params = compact('data');
|
||||||
$results = $this->getEventManager()->trigger('register.pre', $this, $params);
|
$results = $this->getEventManager()->trigger('register.pre', $this, $params);
|
||||||
$cache_data = $results->last();
|
$cache_data = $results->last();
|
||||||
|
|
|
@ -33,6 +33,7 @@ class User extends AbstractEventManager implements ServiceManagerAwareInterface
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 所有用户
|
||||||
* @param $usertype
|
* @param $usertype
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +47,34 @@ class User extends AbstractEventManager implements ServiceManagerAwareInterface
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 用户详细信息
|
||||||
|
* @param $userid
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function view ($userid) {
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM users WHERE id = $userid";
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
|
||||||
|
return $rs->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁止用户
|
||||||
|
* @param $userid
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function ban ($userid, $status) {
|
||||||
|
|
||||||
|
$sql = "UPDATE users SET status= $status WHERE id = $userid";
|
||||||
|
$this->db->exec($sql);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 黑河用户
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function fetchAllHeiHe () {
|
public function fetchAllHeiHe () {
|
||||||
|
@ -59,6 +88,10 @@ class User extends AbstractEventManager implements ServiceManagerAwareInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有长时间未登录的用户
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
public function fetchAllSendmail () {
|
public function fetchAllSendmail () {
|
||||||
|
|
||||||
$time = date("Y-m-d H:i:s", time()-3 * 365 * 24 * 3600);
|
$time = date("Y-m-d H:i:s", time()-3 * 365 * 24 * 3600);
|
||||||
|
|
Loading…
Reference in New Issue