Пример #1
0
 /**
  *   Обновляет учетную запись
  * @return
  */
 public function update()
 {
     $granted = EventController::callFilter('users_account_before_update', true);
     // if granted then call standart update
     if ($granted) {
         $this->last_activity_date->setValue(date('Y-m-d H:i:s'));
         parent::update();
         EventController::callEvent('users_account_after_update');
         ACLUser::regenerateGuestCache($this);
     }
 }
Пример #2
0
 public function update()
 {
     if ($this->withSitemap) {
         // Получаем сайтмап данные
         $this->needSitemapData();
         $sitemapInfo = $this->returnSitemapParams();
         Sitemap::updatePage(static::ModelName, $this->id->getValue(), $this->name->getValue(), $sitemapInfo['url_key'], $this->sitemapInfo['parent']);
         // Очищаем текущие сайтмап данные и обновлеяем их
         $this->sitemapInfo = null;
         $this->needSitemapData();
     }
     // Обновляем
     return parent::update();
 }