コード例 #1
0
ファイル: DbTable.php プロジェクト: Andyyang1981/pi
 /**
  * {@inheritDoc}
  */
 public function killUser($uid)
 {
     $result = null;
     if ($uid) {
         $row = null;
         try {
             $row = $this->model->find($uid, 'uid');
         } catch (\Exception $e) {
             $result = false;
         }
         if ($row) {
             try {
                 $row->delete();
                 $result = true;
             } catch (\Exception $e) {
                 $result = false;
             }
         }
     }
     return $result;
 }