Divi Creative Login comes with a handful of built in variables available for use when writing your “already logged in” message for users who are logged in.
These variables follow the same pattern used by Elegant Themes: the variable name wrapped in 2 percent signs (%) on either side, for example: %%first_name%%. The pattern should look familiar if you’ve used the Divi Contact Form module in any capacity.
The following are the variables currently available for use.
- %%display_name%% – outputs the user’s display name set in their user profile.
- %%first_name%% – outputs the first name of the logged in user.
- %%last_name%% – outputs the last name or surname of the logged in user.
- %%user_email%% – outputs the email address for the logged in user.
Below is a common example of an ‘already logged in’ message and it’s output.
Welcome back, %%first_name%%! (%%user_email%%).
would output: “Welcome back, Alex! (email@example.com).” if I logged into a site using the creative login plugin.