1.20.x user.entity.inc public User::save()

Implements EntityInterface::save().

Overrides Entity::save

File

modules/user/user.entity.inc, line 253
Entity classes and controllers for User module.

Class

User
Defines the user entity class.

Code

public function save() {
  // Since pictures are not yet fields Save the picture object, if it is set.
  $picture = empty($this->picture) ? NULL : $this->picture;
  // Save the user.
  $return = parent::save();
  // Restore the picture object.
  $this->picture = $picture;

  return $return;
}