You are here

public function MyLiveChat::validate_id in My Live Chat 7

Same name and namespace in other branches
  1. 6 mylivechat.php \mylivechat::validate_id()

License number validation

1 call to MyLiveChat::validate_id()
MyLiveChat::is_installed in ./mylivechat.php
Checks if MyLiveChat settings are properly set up

File

./mylivechat.php, line 51
MyLiveChat module for Drupal

Class

MyLiveChat
@file MyLiveChat module for Drupal

Code

public function validate_id($mylivechatid) {
  $license = (int) $mylivechatid;
  if ($license === 0) {
    return FALSE;
  }
  return preg_match('/^[0-9]{8}$/', $license);
}