function delete($id) { if ($id) { $pm = new Pm($id); $pm->delete(); set_notify('success', 'ลบข้อความส่วนตัวเรียบร้อย'); } redirect('pms/inbox'); }
/** * \brief Class configuration */ public static function configureUserHandler($_gconf) { include '_conf.inc.php'; self::$_conf = $_conf; self::$_https = $_gconf['_sys_https']; Role::configureRoleHandler($_gconf, $_conf); if ($_conf['_pm_enable']) { Pm::configurePmHandler($_gconf, $_conf); } if ($_conf['_forum_enable']) { Forum::configureForumHandler($_gconf, $_conf); } self::$_db = $_gconf['_db']; if (self::$_db === null) { throw new \Exception('User plug-in needs a database connection.'); } }