Esempio n. 1
0
 public function handleErrorEdit()
 {
     $user = UserPeer::getByUsername($this->getRequestParameter('username'));
     // make sure it's a valid user, and that we're editing our own profile
     if (!$user instanceof User) {
         $this->error = 'No such user exists.';
         $this->setTemplate('_error');
         return sfView::SUCCESS;
     } else {
         if (!$this->getUser()->getRaykuUser()->equals($user)) {
             $this->error = 'You do not have permission to edit this user\'s profile.';
             $this->setTemplate('_error');
             return sfView::SUCCESS;
         }
     }
     // passing to view
     $this->user = $user;
     return sfView::SUCCESS;
 }
Esempio n. 2
0
?>

 <?php 
echo link_to($message->getSender()->getName(), '@profile?username='******'class' => 'usrname'));
?>
<br/><br/>

        <p class="awrds" style="line-height:16px">NOTE: *The contents of this message is confidential and should<br />
          not be duplicated without the expressed permission of sender*</p>
      </div>
      <div class="spacer" style="border-top:1px solid #DDD;margin-bottom:15px;"></div>
      <div class="title">Message:</div>
      <div class="spacer"></div>
      <div class="msg">
        <?php 
$kinkarsoUser = UserPeer::getByUsername(RaykuCommon::SITE_USER_USERNAME);
if ($kinkarsoUser && $kinkarsoUser->getId() == $message->getSenderId()) {
    echo $message->getBody();
} else {
    echo $message->getBody();
}
?>
      </div>
    </div>
    <div class="spacer"></div>
    <div class="bottom"></div>
  </div>
  <div style="float:right;"> <a href="/message/compose/<?php 
echo $message->getSender()->getUsername();
?>
/subject/Re: <?php