This is User Content example. just use this shortcode and show a restricted content for guest user, it will automatically show this content after login.
Note: you can use this shortcode in article and custom module. for your help we give an example bellow


This content is for registered users only. Please Login.
[user_content]Content for logged User Content[/user_content]