diff --git src/wp-includes/admin-bar.php src/wp-includes/admin-bar.php
index 0acefd0..b7fa8fe 100644
|
|
function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) { |
182 | 182 | function wp_admin_bar_my_account_item( $wp_admin_bar ) { |
183 | 183 | $user_id = get_current_user_id(); |
184 | 184 | $current_user = wp_get_current_user(); |
185 | | $profile_url = get_edit_profile_url( $user_id ); |
| 185 | $profile_url = ( 0 < count( $user->allcaps ) ) ? get_edit_profile_url( $user_id ) : '#'; |
186 | 186 | |
187 | 187 | if ( ! $user_id ) |
188 | 188 | return; |
… |
… |
function wp_admin_bar_my_account_item( $wp_admin_bar ) { |
213 | 213 | function wp_admin_bar_my_account_menu( $wp_admin_bar ) { |
214 | 214 | $user_id = get_current_user_id(); |
215 | 215 | $current_user = wp_get_current_user(); |
216 | | $profile_url = get_edit_profile_url( $user_id ); |
| 216 | $profile_url = ( 0 < count( $user->allcaps ) ) ? get_edit_profile_url( $user_id ) : '#'; |
217 | 217 | |
218 | 218 | if ( ! $user_id ) |
219 | 219 | return; |
diff --git src/wp-login.php src/wp-login.php
index b9dbd61..060d8f5 100644
|
|
default: |
811 | 811 | elseif ( is_multisite() && !$user->has_cap('read') ) |
812 | 812 | $redirect_to = get_dashboard_url( $user->ID ); |
813 | 813 | elseif ( !$user->has_cap('edit_posts') ) |
814 | | $redirect_to = admin_url('profile.php'); |
| 814 | $redirect_to = ( 0 < count( $user->allcaps ) ) ? admin_url('profile.php') : get_home_url(); |
815 | 815 | } |
816 | 816 | wp_safe_redirect($redirect_to); |
817 | 817 | exit(); |