[spalenque] - #7849 *FIXED
This commit is contained in:
parent
5b2e4c71e9
commit
6ebf90ccc8
@ -91,6 +91,7 @@ if (Director::isDev()) {
|
||||
|
||||
//sangria configuration
|
||||
Object::add_extension('SangriaPage_Controller', 'SangriaPageDeploymentExtension');
|
||||
Object::add_extension('SangriaPage_Controller', 'SangriaPageSurveyDetailsExtension');
|
||||
Object::add_extension('SangriaPage_Controller', 'SangriaPageStandardizeOrgNamesExtension');
|
||||
Object::add_extension('SangriaPage_Controller', 'SangriaPageViewCurrentStoriesExtension');
|
||||
Object::add_extension('SangriaPage_Controller', 'SangriaPageExportDataExtension');
|
||||
|
@ -134,6 +134,7 @@ class DeploymentSurveyPage_Controller extends Page_Controller
|
||||
'SavePasswordForm',
|
||||
'SavePassword',
|
||||
'CheckEmail',
|
||||
'CheckName',
|
||||
'MemberStart'
|
||||
);
|
||||
|
||||
@ -149,6 +150,19 @@ class DeploymentSurveyPage_Controller extends Page_Controller
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
public function CheckName()
|
||||
{
|
||||
$first_name = Convert::raw2sql($this->request->getVar('FirstName'));
|
||||
$last_name = Convert::raw2sql($this->request->getVar('LastName'));
|
||||
|
||||
//Check for existing member name
|
||||
$res = true;
|
||||
if ($member = Member::get()->filter(array('FirstName'=>$first_name,'Surname'=>$last_name))->first()) {
|
||||
$res = false;
|
||||
}
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
function init()
|
||||
{
|
||||
parent::init();
|
||||
|
@ -41,6 +41,10 @@ final class SangriaPage_Controller extends Page_Controller {
|
||||
'FilterResults',
|
||||
);
|
||||
|
||||
static $url_handlers = array(
|
||||
'GET SurveyDetails/$ID' => 'SurveyDetails',
|
||||
);
|
||||
|
||||
function init() {
|
||||
if(!Permission::check("SANGRIA_ACCESS")) Security::permissionFailure();
|
||||
parent::init();
|
||||
|
Loading…
Reference in New Issue
Block a user