public IActionResult Show(int userid)
        {
            // Get the user
            User user = _context.PopulateUserSingle(userid);

            // ViewBag settings
            ViewBag.dashboard = false;
            // Return the View
            return(View(user));
        }
Beispiel #2
0
        // Fetch the user object
        public User fetchuser()
        {
            // Get the user id from the Session if it exists
            int?user_id = HttpContext.Session.GetInt32("user");

            // Return the user or null
            if (user_id != null)
            {
                return(_context.PopulateUserSingle((int)user_id));
            }
            else
            {
                return(null);
            }
        }