I am trying to redirect the user to a page for which he is an organic user, and I want this redirect to happen after user login.
I am trying to use the
hook_user_login() to make this redirect. However, I have found that when I inspect the
$user object when it hits that hook, the
$user->og_user_node field is empty. When I look at the user's edit screen (or when I inspect it with devel), it does have associated groups.
How can I retrieve a user's groups to make this redirect?