Skip to content

Commit e4d3c1a

Browse files
Serve captcha images for career portal
1 parent 7c8acdb commit e4d3c1a

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

modules/careers/CareersUI.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ private function careersPage()
154154
break;
155155
}
156156

157-
if ($p == 'showAll')
157+
if ($p == 'captcha')
158+
{
159+
$this->outputCareerPortalCaptcha();
160+
}
161+
else if ($p == 'showAll')
158162
{
159163
$template['Content'] = $template['Content - Search Results'];
160164

@@ -1128,6 +1132,19 @@ private function careersPage()
11281132
}
11291133
}
11301134

1135+
private function outputCareerPortalCaptcha()
1136+
{
1137+
$builder = new \Gregwar\Captcha\CaptchaBuilder();
1138+
$builder->build();
1139+
1140+
$_SESSION['careerPortalCaptcha'] = $builder->getPhrase();
1141+
1142+
header('Content-type: image/jpeg');
1143+
$builder->output();
1144+
1145+
die();
1146+
}
1147+
11311148

11321149
private function _makeApplyValidator($template)
11331150
{

0 commit comments

Comments
 (0)