Skip to content

Commit

Permalink
Merge pull request #1557 from voltan/develop
Browse files Browse the repository at this point in the history
Fix #1542
  • Loading branch information
voltan authored Sep 6, 2017
2 parents fde8b58 + 487d1be commit ca9e7e9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
8 changes: 7 additions & 1 deletion usr/custom/module/user/config/form.register.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $captchaElement = array(
'element' => Pi::service('form')->getReCaptcha($captchaMode)
);

return array(
$form = array(
// Use user module field
'email',
'name',
Expand Down Expand Up @@ -102,3 +102,9 @@ return array(
),
),
);

if ($captchaMode == 0) {
unset($form['captcha']);
}

return $form;
24 changes: 15 additions & 9 deletions usr/module/user/config/form.register.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php
/**
* Pi Engine (http://pialog.org)
*
* @link http://code.pialog.org for the Pi Engine source repository
* @copyright Copyright (c) Pi Engine http://pialog.org
* @license http://pialog.org/license.txt BSD 3-Clause License
*/
* Pi Engine (http://pialog.org)
*
* @link http://code.pialog.org for the Pi Engine source repository
* @copyright Copyright (c) Pi Engine http://pialog.org
* @license http://pialog.org/license.txt BSD 3-Clause License
*/

/**
* User register form config
*/
* User register form config
*/

$termEnable = Pi::user()->config('register_term');
$termUrl = Pi::user()->config('register_term_url');
Expand All @@ -28,7 +28,7 @@
'element' => Pi::service('form')->getReCaptcha($captchaMode)
);

return array(
$form = array(
// Use user module field
'email',
'name',
Expand Down Expand Up @@ -84,3 +84,9 @@
),
),
);

if ($captchaMode == 0) {
unset($form['captcha']);
}

return $form;

0 comments on commit ca9e7e9

Please sign in to comment.