示例#1
0
 private function eraseUser()
 {
     $message_m = new \Models\Messages(\lib\Register::get('id'));
     $messages = $message_m->getMessages();
     if (!empty($messages)) {
         foreach ($messages as $message) {
             $message_m->deleteMessages($message->getId());
         }
     }
     $user_e = new \models\User(\lib\Register::get('id'));
     $user_e->delete();
     $user = new \models\Users(\lib\Register::get('id'));
     $user->delete();
     Location::To(URL . 'logout');
 }