Guest User

r-a-y

a guest
Apr 28th, 2010
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. function my_login_redirect($redirect_to,$redirect_to2,$user) {
  2.     global $bp;
  3.  
  4.     $city = xprofile_get_field_data(26, $user->ID );
  5.  
  6.     if( !empty($city) )
  7.         return 'YOUR WEBSITE URL';
  8.     else
  9.         return bp_core_get_user_domain($user->ID) . 'profile/edit/';
  10. }
  11. add_filter('login_redirect','my_login_redirect',100,3);
Advertisement
Add Comment
Please, Sign In to add comment