function hook_push_notifications_store_token in Push Notifications 7
Allows a module to modify the token before it is stored in the database.
Parameters
string &$token The device token to be stored.:
int $type_id Either 1 or 0 depending on the type of device.:
int $uid The user for whom the token is to be stored. Defaults to the: currently logged in user.
Return value
By reference, the token to be stored.
1 invocation of hook_push_notifications_store_token()
- push_notifications_store_token in ./
push_notifications.module - Store a token in the database. Removes all spaces in the token.
File
- ./
push_notifications.api.php, line 24 - Hooks provided by Push Notifications.
Code
function hook_push_notifications_store_token(&$token, $type_id, $uid) {
// If a value exists, stop the writing of the token.
if ($value) {
$token = NULL;
}
}