246c246
<   if (!isset($_POST['form_id']) || $_POST['form_id'] != 'user_pass_reset' || variable_get('login_destination_immediate_redirect', FALSE)) {
---
>   if ($_POST['form_id'] != 'user_pass_reset' || variable_get('login_destination_immediate_redirect', FALSE)) {
256,257c256,257
< print_r($user);
<   if (empty($user) || !$user->uid) {
---
> 
>   if (!$user->uid) {
412c412
<   if(isset($user->roles)) $roles_intersect = array_intersect_key($roles, $user->roles);
---
>   $roles_intersect = array_intersect_key($roles, $user->roles);
489c489
< }
---
> }
\ No newline at end of file
