Explorar o código

Only show reCAPTCHA if key is set.

Alan Lam %!s(int64=8) %!d(string=hai) anos
pai
achega
0baf002f4d
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      views/register.php

+ 7 - 1
views/register.php

@@ -96,7 +96,13 @@
 					</div>
 				</div>
 
-				<div class="g-recaptcha my-3" data-sitekey="<?=GOOGLE_RECAPTCHA_SITE_KEY?>"></div>
+				<?php
+				if(GOOGLE_RECAPTCHA_SITE_KEY) {
+					?>
+					<div class="g-recaptcha my-3" data-sitekey="<?=GOOGLE_RECAPTCHA_SITE_KEY?>"></div>
+					<?php
+				}
+				?>
 
 				<button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>">Register</button>