예제 #1
0
 /**
  * Sets the date format
  *
  * @param PcUser $user
  */
 private static function setDateFormat(PcUser $user)
 {
     $forumTablesPrefix = sfConfig::get('app_forum_tablePrefix');
     $connection = Propel::getConnection();
     $userId = $user->getForumId();
     $query = sprintf("UPDATE " . $forumTablesPrefix . "users SET date_format=%d WHERE id=%d", (int) $user->getDateFormat(true), (int) $userId);
     $statement = $connection->prepare($query);
     $statement->execute();
 }