Joffroi

Using Signed in User's Name in Template

Vote 0 Votes

I'm building a site where I'll have multiple MT users browsing content. I have a pages set up that will only display the content when a user is signed into a MT account. I got that feature working. I eventually have a php mail trigger to send me information when certain events occur. I would like this php generated email to include the user that loads the trigger. I have always been able to include other movable type templates in the scripts, but all the other ways that display the user signed in seem to be javascript. Is there a template tag for the signed in user?

Thanks

Using MT 5+

Reported on Movable Type 5

1 Reply

| Add a Reply
  • When a user is signed in you can refer to the contents of the cookie `mt_blog_user` (which includes their name). Alternatively, if you're publishing a template, when a user is loaded the Author-context tags are populated, so <mt:AuthorDisplayName> will correctly show the authors name.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

code.sixapart.com

139 490

Last Topic: Action Stream for Reddit not working by jack lail on Nov 27, 2012

240 821

Last Topic: Frontend uploading? by mosquito on Nov 7, 2012

88 308

Last Topic: absolute publish date in Manage Entries screen by .mau. on Apr 18, 2012

744 3151

Last Topic: Missing UI Elements (toolbar and categories) by Aaron Macks on Dec 3, 2012

89 318

Last Topic: How to "pretify" a url in htaccess with a few wildcards by Caio on May 30, 2012

187 792

Last Topic: Connection error: Too many connections movable type by Daniel M on Dec 3, 2012

27 96

Last Topic: Upgrading MT by Caio on Oct 15, 2012

49 222

Last Topic: Movable Type 6 Ideas by Caio on May 28, 2012

65 248

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012