I am trying to login as a user I registered as on the front end and have activated the user and clicking on the activation link but when I try and login, it redirects me to https://www.beechwoodsolutions.co.uk/sites/cmsdemo/ and if I visit https://www.beechwoodsolutions.co.uk/si ... rofile.php it says the following

Access Denied

You do not have sufficient privileges to view the page requested. To see this page you must log out and log in with sufficient privileges.

Log Out

Below is my code from the users/login.php file

Code: Select all
<?php require_once( '../cms/cms.php' ); ?>
    <cms:template title='Login' hidden='1' />

    <!-- now the real work -->
    <cms:if k_logged_in >

        <!-- this 'login' template also handles 'logout' requests. Check if this is so -->
        <cms:set action="<cms:gpc 'act' method='get'/>" />
        <cms:if action='logout' >
            <cms:process_logout />
        <cms:else /> 
            <!-- what is an already logged-in member doing on the login page? Send back to homepage. -->
            <cms:redirect k_site_link />
    <cms:else />
        <!-- show the login form -->
        <cms:form method='post' anchor='0'>
            <cms:if k_success >
                    The 'process_login' tag below expects fields named
                    'k_user_name', 'k_user_pwd' and (optionally) 'k_user_remember', 'k_cookie_test'
                    in the form
            redirect="<cms:link 'users/profile.php' />"
            <cms:if k_error >
                <h3><font color='red'><cms:show k_error /></font></h3>
            <div class="form-group">
            <cms:input type='text' name='k_user_name' class='form-control' />
            <div class="form-group">
            <br />
            <cms:input type='password' name='k_user_pwd' class='form-control' />
            <!-- if 'remember me' function is not required, the following checkbox can be omitted -->
            <cms:input type='checkbox' name='k_user_remember' opt_values='Remember me=1' />
            <input type="hidden" name="k_cookie_test" value="1" />
            <button type="submit" name="submit" class="btn btn-default"/>Login</button>
        <!-- optionally display links for 'Create account' and 'Lost password' -->
        <br />
        <cms:if k_user_registration_template >
            Not signed up yet? <a href="<cms:link k_user_registration_template />" />Create an account here.</a> <br>
        <cms:if k_user_lost_password_template >
            Forgot your password? <a href="<cms:link k_user_lost_password_template />" />Click here.</a> <br>

<?php COUCH::invoke(); ?>