You are here

public function CommerceFileLicenseEntity::log in Commerce File 7

Log access to the license by the owner

File

includes/commerce_file_license.entity.inc, line 226
Provides a base class for CommerceFileLicenseEntity.

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

public function log() {
  global $user;

  // log only if current user is owner
  if ($this->uid == $user->uid) {
    commerce_file_license_log_save(array(
      $this->idKey => $this
        ->internalIdentifier(),
    ));
  }
  return $this;
}