You are here

function contact_storage_contact_message_default_ip_address in Contact Storage 8

Default value callback for the contact message ip_address field.

Return value

int The client IP address.

2 string references to 'contact_storage_contact_message_default_ip_address'
contact_storage_entity_base_field_info in ./contact_storage.module
Implements hook_entity_base_field_info().
contact_storage_update_8003 in ./contact_storage.install
Defines fields for the user id and ip address, for the contact messages.

File

./contact_storage.module, line 282
Contains main module logic.

Code

function contact_storage_contact_message_default_ip_address() {
  return \Drupal::request()
    ->getClientIp();
}