Example #1
0
 protected function setAccountStorage($accountname, $camefrom)
 {
     $this->account = \Prj\Data\Manager::getCopy($accountname, $camefrom);
 }
Example #2
0
 /**
  * 启用某账号
  */
 public function enableAction()
 {
     $where = \Lib\Misc\DWZ::decodePkey($this->_request->get('_pkey_val'));
     $manager = \Prj\Data\Manager::getCopy($where['loginname'], $where['camefrom']);
     $manager->load();
     if (!empty($where)) {
         try {
             $manager->setField('dtForbidden', 0);
             $manager->update();
             $ret = true;
         } catch (\ErrorException $e) {
             $ret = false;
         }
     } else {
         $ret = false;
     }
     if ($ret) {
         $this->returnOK('已启用');
     } else {
         $this->returnError('删除失败');
     }
 }