Forum Replies Created
Viewing 6 posts - 1 through 6 (of 6 total)
-
AuthorPosts
-
soulsacrifireMember
Hi Khaled,
this is my redirect code. I’m not able to have the right redirectionadd_filter( 'user_meta_filter_list', 'enableLoginRedirect' ); function enableLoginRedirect( $list ){ $list['login_redirect'] = true; return $list; } add_filter( 'login_redirect', 'redirectToProfile', 10, 3 ); function redirectToProfile( $redirect_to, $redirect, $user ){ global $userMeta, $user_ID; $role = $userMeta->getUserRole( $user_ID ); if( ( in_array( $role, array( 'other' ) ) )) { $redirect_to = 'http://www.google.com'; } elseif( ( in_array( $role, array( 'touristguide', 'touroperator', 'hotel' ) ) )) { $redirect_to = 'http://www.bing.com'; } update_user_meta( $user->ID, 'first_login_detected', '1' ); return $redirect_to; }
soulsacrifireMemberHi Khaled,
thanks a lot for your suggestion.
I’ve changed idea and I’ve created a first login redirection after the login phase.
Based on the role value I’m able to show/hide fields but not the field label!add_filter( 'user_meta_field_display', 'user_meta_field_display_function', 10, 3 ); function user_meta_field_display_function($html, $fieldID, $formName){ global $userMeta, $user_ID; $role = $userMeta->getUserRole( $user_ID ); if( in_array( $role, array( 'other' ) ) && ( $fieldID == '5' || $fieldID == '18' || $fieldID == '7' || $fieldID == '22' || $fieldID == '6' || $fieldID == '9' || $fieldID == '10' || $fieldID == '11' || $fieldID == '19' )) return null; return $html; }
soulsacrifireMemberI’ve deactivated the plugin and activated but I’m not able to use the recaptcha field.
soulsacrifireMemberI’ve dropped my registration form and I’ve created a new one but it doesn’t work.
soulsacrifireMemberI’ve removed the reCaptcha field from my form and now I’m getting the “Please fill in the reCAPTCHA form” error.
- This reply was modified 11 years ago by soulsacrifire.
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)