function _push_notifications_set_random_certificate_string in Push Notifications 7
Generate and set the random file ending for APNS certificates.
2 calls to _push_notifications_set_random_certificate_string()
- push_notifications_install in ./
push_notifications.install - Implements of hook_install().
- push_notifications_regenerate_certificate_string_submit in includes/
push_notifications.admin.inc - Form callback for regenerating the APNS certificate string.
File
- ./
push_notifications.module, line 1387 - Push Notifications functionality.
Code
function _push_notifications_set_random_certificate_string() {
// Generate a random 10-digit string.
$random_string = substr(md5(microtime()), 0, 10);
variable_set('push_notifications_apns_certificate_random', '-' . $random_string);
}