Welcome to the Cookbook

loading...

5.2.2 Displaying Auth Error Messages

In order to display the error messages that Auth spits out you need to add the following code to your view. In this case, the message will appear below the regular flash messages:

In order to show all normal flash messages and auth flash messages for all views add the following two lines to the views/layouts/default.ctp file in the body section preferable before the content_for_layout line.

<?php
	$session->flash();
	$session->flash('auth');
?>
  1. <?php
  2. $session->flash();
  3. $session->flash('auth');
  4. ?>