Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

In the Forums: Show Email Address in Comments

In the forums, “Frychiko” asked if it’s possible to display a user’s email address with their comment.

I was wondering if it is possible to display an email address for each comment displayed under an weblog post.

I run weekly giveaways and it is quite annoying having to find emails by SQL queries in the admin section of the control panel. Last time I checked the documentation there was no option to display the email address.

Mark Bowen came up with a simple query using the Query Module to fetch the email address of the commenter.

My suggestion would be to wrap that email address in a conditional that only displays it for Super Admins and not the entire world (including spammers).

Posted on May 11, 2009 by Ryan Irelan

Filed Under: In the Forums

Mark Bowen11:29 on 05.12.2009

Hi Ryan,

Yep definitely an idea that although I purposely left out any additions just so that it would be easy to see what is going on with the query and everything else. I also only placed in the variables for the email and url instead of all the html required too. At first I wrote the whole lot out but looking at it all myself it started to get quite heavy so thought it best to leave it at the bare minimum of code just so that what I had done could be seen.

Agree with you though that the e-mail could be hidden and would probably be a good idea. I wasn’t sure from the OP whether or not this is what they wanted though.

Best wishes,

Mark