registration/login problems

Permalink 1 user found helpful
Hello everyone,

A client recently complained about the following problems with login/registration on his C5 site:

(1) If you've already registered with a particular email address, attempts to re-register with that same email address kick you back to the registration page, but with no information about why registration failed. This has happened several times when visitors have (for example) forgotten that they already registered for his site. It doesn't say they solved the captcha wrong, it just reloads the page.

(2) Similarly, if try to login with an invalid user id or type the wrong password for a valid user id, the login page reloads without telling you why your login attempt failed. This is particularly curious, since I've observed that there is an appropriate error message for failed logins on concrete5.org.

I don't see any configuration options for either of these on the Dashboard. I'm running the latest version of c5. Could this be an issue with the theme rather than the core package? (I'm using Earthtones Water.) Help please!

Thanks!

 
Brainakazariua replied on at Permalink Best Answer Reply
Brainakazariua
Check if this code is in your login.php & register.php files: (/concrete/single_pages)

<div id="ccm-theme-wrapper">
<?php  if (isset($error)) { ?>
   <?php  
   if ($error instanceof Exception) {
      $_error[] = $error->getMessage();
   } else if ($error instanceof ValidationErrorHelper) { 
      $_error = $error->getList();
   } else if (is_array($error)) {
      $_error = $error;
   } else if (is_string($error)) {
      $_error[] = $error;
   }
      ?>
      <ul class="ccm-error">
      <?php  foreach($_error as $e) { ?><li><?php echo $e?></li><?php  } ?>


if it's not in there then you can add it, it should show the errors then.
lcbrett replied on at Permalink Reply
Hmm...this didn't work, but I think it must be something I'm doing wrong on my end because the login page doesn't seem to change when I do other things (like changing the "Please sign on" message). Clearing caches for my browser and the site didn't fix it. What else should I be doing?

(And thanks, btw!!!)
Mnkras replied on at Permalink Reply
Mnkras
are you themeing the login and register pages?
lcbrett replied on at Permalink Reply
Ah, yes! Now Brainakazariua's code works perfectly. Thank you both! I had to make his changes in the view.php file for the theme (just above the
<?php print $innerContent; ?>
). And of course after bothering you all I found a discussion about this very topic:

http://www.concrete5.org/community/forums/themes/customizing-login-...

Thanks again!
nisqually replied on at Permalink Reply
nisqually
Where on the login and register page do we add this code? do we need a </div> too?