title: How to show user name of which user created a comment on an order in Magento 1.7
body: <p>When one of us admins on our team creates a comment on an order, I'd like to show their name right their with the comment they wrote.</p>
  
  <p>This will help us know who's commenting when we see a comment has been made.</p>
  
  <p>I found somewhat of a <a href="https://stackoverflow.com/questions/6219620/add-username-to-order-comment-history">solution for this for 1.4</a>, <strong>but we're using 1.7</strong>, and I feel using the 1.4 solution would fail us here.</p>
  
  <p>If anyone could help, that would be much appreciated. Thanks all! </p>
  
  <p><strong>SOLVED</strong>:</p>
  
  <p>I listened to the answer by  R.S, in his earlier, <a href="https://stackoverflow.com/revisions/13039841/5">shorter edit</a>, which said to simply add this code to:</p>
  
  <p>/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php</p>
  
  <pre><code>    public function addCommentAction(){
   ......
  
   // get the login info of current user
   $_user = Mage::getSingleton('admin/session');
   $user['email'] = $_user-&gt;getUser()-&gt;getEmail();
   $user['firstname'] = $_user-&gt;getUser()-&gt;getFirstname();
   $user['lastname'] = $_user-&gt;getUser()-&gt;getLastname();
  
   $order-&gt;addStatusHistoryComment($data['comment'] . " Add by {$user['firstname']}", $data['status'])
                  -&gt;setIsVisibleOnFront($visible)
                  -&gt;setIsCustomerNotified($notify);
  </code></pre>
  
  <p>And this works perfectly!</p>