---
title: "[ms-user]"
source: "https://docs.nexcess.com/software/learndash/memberdash/ms-user/"
description: "The [ms-user] shortcode controls visibility of content based on user type, regardless of membership level. This makes it useful for showing certain information…"
vertical: "Software"
area: "MemberDash"
topics: ["MemberDash", "Restricting Content", "Settings", "Shortcodes", "Users and Groups"]
date: "2024-03-13"
last_modified: "2026-07-02"
---

# [ms-user]

The `[ms-user]` shortcode controls visibility of content based on user type, regardless of membership level. This makes it useful for showing certain information to logged-in users, guests, administrators, or non-admins.

## Parameters

The shortcode supports the following attributes:

**msg** (text)  
A custom protection message shown to users who do not have access to the content  
Default: empty

**type** (`all` | `loggedin` | `guest` | `admin` | `non-admin`)  
Defines which type of users can see the content  
Default: `"loggedin"`

## Examples

**Show content only to logged-in users (default):**

```
[ms-user] You are logged in [/ms-user]

```

**Show content only to guests with custom links:**

```
[ms-user type="guest"] <a href="">Sign up now</a>! <a href="">Already have an account</a>? [/ms-user]
```

**Important Note:** The content protection setting must be enabled for this shortcode to work.  
Go to **MemberDash > Settings > General**.  
Turn on **Content Protection**.

## Conclusion

The `[ms-user]` shortcode provides a simple way to control content visibility based on whether a visitor is logged in, a guest, an administrator, or a non-admin. Combined with custom messages, it helps guide users toward the right actions, such as logging in or registering.
