diff --git a/identification.php b/identification.php index 6490f5f86..f5f675c7b 100644 --- a/identification.php +++ b/identification.php @@ -30,6 +30,13 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); // +-----------------------------------------------------------------------+ check_status(ACCESS_FREE); +// but if the user is already identified, we redirect to gallery home +// instead of displaying the log in form +if (!is_a_guest()) +{ + redirect(get_gallery_home_url()); +} + trigger_notify('loc_begin_identification'); //-------------------------------------------------------------- identification diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 300a37d31..624cf695f 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -515,7 +515,13 @@ function register_default_menubar_blocks($menu_ref_arr) $menu->register_block( new RegisteredBlock( 'mbTags', 'Related tags', 'piwigo')); $menu->register_block( new RegisteredBlock( 'mbSpecials', 'Specials', 'piwigo')); $menu->register_block( new RegisteredBlock( 'mbMenu', 'Menu', 'piwigo')); - $menu->register_block( new RegisteredBlock( 'mbIdentification', 'Identification', 'piwigo') ); + + // We hide the quick identification menu on the identification page. It + // would be confusing. + if (script_basename() != 'identification') + { + $menu->register_block( new RegisteredBlock( 'mbIdentification', 'Identification', 'piwigo') ); + } } /**