コード例 #1
0
        public virtual IActionResult Index(int?pageNumber, string tab)
        {
            if (!_forumSettings.AllowPrivateMessages)
            {
                return(RedirectToRoute("Homepage"));
            }

            if (_workContext.CurrentCustomer.IsGuest())
            {
                return(Challenge());
            }

            var model = _privateMessagesModelFactory.PreparePrivateMessageIndexModel(pageNumber, tab);

            return(View(model));
        }
コード例 #2
0
        public ActionResult Index(int?page, string tab)
        {
            if (!_forumSettings.AllowPrivateMessages)
            {
                return(RedirectToRoute("HomePage"));
            }

            if (_workContext.CurrentCustomer.IsGuest())
            {
                return(new HttpUnauthorizedResult());
            }

            var model = _privateMessagesModelFactory.PreparePrivateMessageIndexModel(page, tab);

            return(View(model));
        }