Custom Login / Register with Warnings / Messages


I always create custom login/register pages using entries in app.php like this that use the view file:
return array(
    'theme_paths' => array(     
        '/login' => 'website_by_madesimplemedia',    
        '/register' => 'website_by_madesimplemedia'

This works great, but when a user enters the wrong details for example there is no error message or guidance to tell what the issue is.

Is there some code I can add to show a warning if they enter the wrong credentials?


View Replies: View Best Answer
surefyre replied on at Permalink Best Answer Reply
Pop this into your custom login/registration page... (alter the html to suit of course!)

if (isset($error) && $error->has()) {
    echo'<div class="row"><div class="col-sm-12"><h2>Please correct the following:</h2>';
    echo'<div style="padding-left:4em;">';
    echo'</div></div><br />';

Unfortunately I'm still trying how to change the moronic 'Invalid token' error for when a form times out - that must mean SO much to everyday users if they receive it... ;)
madesimplemedia replied on at Permalink Reply
Sorry for my slow reply, thanks for this!
And agreed on the error message!