diff -r dc6026376919 -r 5bd429428101 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Wed Jan 23 12:48:22 2008 -0500 +++ b/plugins/SpecialUserFuncs.php Thu Jan 24 22:06:09 2008 -0500 @@ -373,14 +373,6 @@ $captcha_code = ( isset($data['captcha_code']) ) ? $data['captcha_code'] : false; $level = ( isset($data['level']) ) ? intval($data['level']) : USER_LEVEL_MEMBER; $result = $session->login_with_crypto($data['username'], $data['crypt_data'], $data['crypt_key'], $data['challenge'], $level, $captcha_hash, $captcha_code); - $session->start(); - - // Run the session_started hook to establish special pages - $code = $plugins->setHook('session_started'); - foreach ( $code as $cmd ) - { - eval($cmd); - } if ( $result['success'] ) { @@ -419,18 +411,11 @@ { $result = $session->login_without_crypto($_POST['username'], $_POST['pass'], false, intval($_POST['auth_level']), $captcha_hash, $captcha_code); } - $session->start(); - - // Run the session_started hook to establish special pages - $code = $plugins->setHook('session_started'); - foreach ( $code as $cmd ) - { - eval($cmd); - } - - $paths->init(); + if($result['success']) { + $session->start(); + $template->load_theme($session->theme, $session->style); if(isset($_POST['return_to'])) {