Can't find "You are already logged in" in Login page

Hello team,

I am trying to find the right login page in the concrete site directory to edit, but I am coming short on what to look for. Currently, you will be greeted with a “You are already logged in” page when you try to visit the “/login” route as a logged in user. I have checked application/authentication/concrete, application/single_pages and even the theme package we use (Fruitful), but still can’t find any reference to what I am looking for.

The point of this was to edit the “You are already logged in” section and add a new element to it when it is displayed. We currently use Concrete version 8.5.7. Below is a snapshot of the page:

Any suggestion to point me in the right direction will be appreciated. Thank you!

Take a look in the concrete/single_pages/login.php file

Thank you for your response, but I still couldn’t find what I am looking for in that file. This is what I am seeing:

<div class="login-page">

    <?php
    $disclaimer = new Area('Disclaimer');
    if ($disclaimer->getTotalBlocksInArea($c) || $c->isEditMode()) { ?>
        <div class="ccm-login-disclaimer">
            <?php echo $disclaimer->display($c);?>
        </div>
    <?php } ?>
    <div class="col-sm-6 col-sm-offset-3">
        <h1><?php echo !$attribute_mode ? t('Sign In.') : t('Required Attributes') ?></h1>
    </div>
    <div class="col-sm-6 col-sm-offset-3 login-form">
        <div class="row">
            <div class="visible-xs ccm-authentication-type-select form-group text-center">
                <?php
                if ($attribute_mode) {
                    ?>
                    <i class="fa fa-question"></i>
                    <span><?php echo t('Attributes') ?></span>
                <?php

                } elseif (count($activeAuths) > 1) {
                    ?>
                    <select class="form-control col-xs-12">
                        <?php
                        foreach ($activeAuths as $auth) {
                            ?>
                            <option value="<?php echo $auth->getAuthenticationTypeHandle() ?>">
                                <?php echo $auth->getAuthenticationTypeDisplayName() ?>
                            </option>
                        <?php

                        }
                    ?>
                    </select>

                    <?php

                }
                ?>
                <label>&nbsp;</label>
            </div>
        </div>
        <div class="row login-row">
            <div <?php if (count($activeAuths) < 2) {
    ?>style="display: none" <?php 
} ?> class="types col-sm-4 hidden-xs">
                <ul class="auth-types">
                    <?php
                    if ($attribute_mode) {
                        ?>
                        <li data-handle="required_attributes">
                            <i class="fa fa-question"></i>
                            <span><?php echo t('Attributes') ?></span>
                        </li>
                        <?php

                    } else {
                        /** @var AuthenticationType[] $activeAuths */
                        foreach ($activeAuths as $auth) {
                            ?>
                            <li data-handle="<?php echo $auth->getAuthenticationTypeHandle() ?>">
                                <?php echo $auth->getAuthenticationTypeIconHTML() ?>
                                <span><?php echo $auth->getAuthenticationTypeDisplayName() ?></span>
                            </li>
                        <?php

                        }
                    }
                    ?>
                </ul>
            </div>
            <div class="controls <?php if (count($activeAuths) < 2) {
    ?>col-sm-12<?php 
} else {
    ?>col-sm-8<?php 
} ?> col-xs-12">
                <?php
                if ($attribute_mode) {
                    $attribute_helper = new Concrete\Core\Form\Service\Widget\Attribute();
                    ?>
                    <form action="<?php echo View::action('fill_attributes') ?>" method="POST">
                        <div data-handle="required_attributes"
                             class="authentication-type authentication-type-required-attributes">
                            <div class="ccm-required-attribute-form"
                                 style="height:340px;overflow:auto;margin-bottom:20px;">
                                <?php
                                foreach ($required_attributes as $key) {
                                    echo $attribute_helper->display($key, true);
                                }
                    ?>
                            </div>
                            <div class="form-group">
                                <button class="btn btn-primary pull-right"><?php echo t('Submit') ?></button>
                            </div>

                        </div>
                    </form>
                    <?php

                } else {
                    /** @var AuthenticationType[] $activeAuths */
                    foreach ($activeAuths as $auth) {
                        ?>
                        <div data-handle="<?php echo $auth->getAuthenticationTypeHandle() ?>"
                             class="authentication-type authentication-type-<?php echo $auth->getAuthenticationTypeHandle() ?>">
                            <?php $auth->renderForm($authTypeElement ?: 'form', $authTypeParams ?: array()) ?>
                        </div>
                    <?php

                    }
                }
                ?>
            </div>
        </div>
    </div>
     <div style="clear:both"></div>

I believe the content I am seeing is been loaded from somewhere else at least from what I am seeing in this file. When I inspect the page, the content I want to edit is under this div element:

 <div class="controls <?php if (count($activeAuths) < 2) {
    ?>col-sm-12<?php 
} else {
    ?>col-sm-8<?php 
} ?> col-xs-12"></div>

if you are pulling the core files from your ‘updates’ folder, you might have to find the path to the login.php file that your site is using.
For example - updates/concrete5-8.5.7/concrete/single_pages/login.php

1 Like

I was able to find it in the updates directory. I extend the single_page for login.php (since there was none in the application/single_pages directory) and made my edits there. Thank you very much for your help!

1 Like