Mike Brooks
Forum Replies Created
-
Forum: Plugins
In reply to: [My Private Site] After login, user is redirected to dashboard, not multisiteI would like to thank you for your extremely quick response. I must apologize for my delayed response. I have been trying to find a spot in my site that would cause the loss of redirect.
I do have several other plugins. I deactivated them all and only left jonradio Private site active. Even with the settings the same as you described in your previous post, the site still goes to the dashboard when following a redirect link. It goes to the main page when set to “Omit” like it should.
I have verified that my login page location is as follows https://www.domain.com/wps/wp-login.php which, as I understand it, is the default location for the page.
Any suggestions you might have are greatly appreciated.
Forum: Fixing WordPress
In reply to: Post Data to clr_user table through front endI figured this out for myself. I ended up removing the entries from clr_user and adding them to clr_usermeta. Then I changed a few lines of code and everything worked.
This is the code I used:/**add extra user fields*/ add_action( 'show_user_profile', 'my_show_extra_profile_fields' ); add_action( 'edit_user_profile', 'my_show_extra_profile_fields' ); add_action( 'user_new_form', 'my_show_extra_profile_fields' ); if ( current_user_can( 'manage_options' ) ) { function my_show_extra_profile_fields( $user ) { ?> <h3>Extra profile information</h3> <table class="form-table"> <tr> <th><label for="databaseid">SSO-ID</label></th> <td> <input type="text" name="databaseid" id="databaseid" value="<?php echo esc_attr( get_the_author_meta( 'databaseid', $user->ID ) ); ?>" class="regular-text" /><br /> </td> </tr> <tr> <th><label for="companyid">Company-ID</label></th> <td> <input type="text" name="companyid" id="companyid" value="<?php echo esc_attr( get_the_author_meta( 'companyid', $user->ID ) ); ?>" class="regular-text" /><br /> </td> </tr> <tr> <th><label for="companyname">Company Name</label></th> <td> <input type="text" name="companyname" id="companyname" value="<?php echo esc_attr( get_the_author_meta( 'companyname', $user->ID ) ); ?>" class="regular-text" /><br /> </td> </tr> </table> <?php }} else {} /**update extra user fields*/ add_action( 'personal_options_update', 'my_save_extra_profile_fields' ); add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); add_action( 'user_new_form', 'my_save_extra_profile_fields' ); function my_save_extra_profile_fields( $user_id ) { if ( !current_user_can( 'edit_user', $user_id ) ) return false; update_user_meta( $user_id, 'databaseid', $_POST['databaseid'] ); update_user_meta( $user_id, 'companyid', $_POST['companyid'] ); update_user_meta( $user_id, 'companyname', $_POST['companyname'] );
This code adds extra fields to the edit user profile and the new user page, then ensures that the fields will update. Please note that this code is modified to only allow admins to see this data. It will not show up for any non-admin pages. All this code resides in functions.php
Forum: Plugins
In reply to: [Erident Custom Login and Dashboard] reset password redirect loopLibin,
I sincerely apologize for bothering you. It was a setting in the jonradio Private site plugin that I overlooked. I had to select “Omit Redirect” from the landing location after activating your plugin.
Deactivating Erident gives the false impression that the cause was with your plugin because there is no longer a custom login page active when Erident is disabled.
Also, thank you for your impressively quick response.