protected function BotchaRecipeUsingJsAbstract::getJsChops in BOTCHA Spam Prevention 7.3
Same name and namespace in other branches
- 6.2 controller/botcha_recipe.controller.inc \BotchaRecipeUsingJsAbstract::getJsChops()
- 6.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipeUsingJsAbstract::getJsChops()
- 7.2 controller/botcha_recipe.controller.inc \BotchaRecipeUsingJsAbstract::getJsChops()
File
- controller/
recipe/ botcha.recipe.controller.inc, line 637 - Controller layer of the BotchaRecipe objects.
Class
Code
protected function getJsChops() {
$secure_token = $this
->getProperty($this->settings['js']['secure_token'], 'getJsSecureToken');
// Chop the token in 3 parts.
$js_chops = array();
$chop1 = 2;
$js_chops[$chop1] = substr($secure_token, 0, $chop1);
$chop2 = mt_rand(5, 8);
$js_chops[$chop2] = substr($secure_token, $chop1 + $chop2);
return $js_chops;
}