After I logout. I couldn't login. I didn't assign the block for the user login. I tried out ,

  1. ?q=user

  2. $block['content'] = drupal_get_form('user_login_block');

  3. $form = drupal_get_form('user_login');

It displays:

User account Error

The website encountered an unexpected error. Please try again later.

How to get the log in. Please help me


Best bet is to reset the default theme to Bartik or one of the other core themes to log in, then you can fix your mistake there.

Using Drush:

drush vset theme_default bartik

Not using Drush:

Look in your variables table and switch out whatever is currently in theme_default for bartik (ensure that the number following from s: matches the number of letters in the theme name, so Bartik would be 6, Garland would be 7)

UPDATE variable SET value='s:6:"bartik"' WHERE name = 'theme_default';

(Modified from Unusable theme - How To reset your theme)

| improve this answer | |
  • Please say how to use drush vset theme_default bartik – sindhu Mar 26 '13 at 13:07
  • Tutorials on Drush and CLI are out of scope for this site. If you don't know how to use Drush, then follow the second set of instructions :) – Chapabu Mar 26 '13 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.