Hi guys
I forgot to add login block in my theme on localhost and I was automatically logging in, but when I cleared sessions and all the browser cookie I can't login and access administrator panel.
How do I can login?
is it possible to switch to default themes which have login block without logging in website?

tnx

Comments

gausarts’s picture

Go to /user or user/login

love, light n laughter

stallman’s picture

tnx for reply
didnt work because my theme is almost static html and havenot completed yet, /user and user/login display the site front page

gausarts’s picture

Hmm, not sure I understand what static means.
Try /?q=user/login for just in case you don't have clean URL enabled or supported.

love, light n laughter

stallman’s picture

static means I have not defined blocks and anything else, it is just a simple html which has been renamed to page.tpl.php

I tried your solution but failed!

VMII’s picture

if you aren't printing any of the core variables like $content then yea, you will have issues with any paths.

https://drupal.org/node/200774 = change theme in database
however, you can also delete the theme folder which would give you the site back albeit without any CSS. Then change the default through the admin.

stallman’s picture

I added this code to page.tpl.php

<?php
 
   
if(!user_is_logged_in() ){
        print
drupal_render(drupal_get_form('user_login'));
    }else{
        print
"You are already logged in!";
   }
?>

and login block appeared

VMII’s picture

One could have also printed the $content variable in page.tpl.php and visited user/login

yet another method of changing the default theme would be to set the default theme in settings.php

$conf['theme_default'] = 'THEMENAME';
VMII’s picture

per: https://drupal.org/node/643758 please edit the opening post and move it to the 'post installation' forum. Thanks.

stallman’s picture

you are right, tnx for your suggestion