public function storeValue($value) { $app = JFactory::getApplication(); if ($app->isAdmin()) { if ($this->is_new) { if (!$value) { $user = JFactory::getUser(); $value = $user->id; } } return parent::storeValue($value); } else { return true; } }