Amit Sukapure
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Auto/custom login fails since 4.7.4@bcworkz sorry for not replying to your comment.
Thanks for your answer and findings regarding above issue. I have too researched in that way and maybewp_auth_set_cookiewas unable to set the right cookie as you’ve explained in your comment.Although after few more tries we’ve found a good workaround π
We are now simply “post” the user data to wp-login.php after
wp_install
Closing the ticket, thanks again for your support.Forum: Developing with WordPress
In reply to: Auto/custom login fails since 4.7.4Thanks.
Client initiates their one click feature in their hosting admin area, which sends an CRM request. CRM copies the WP files to the clientβs server space with our custom install.phpWhere once user clicks on “Install WordPress” button it calls
wp_install(), after successful installation we creating cookies for user for auto login same as WP does. (Not from 4.7.4)Forum: Developing with WordPress
In reply to: Auto/custom login fails since 4.7.4Right!
Let me give you some background π
I’m a developer in One.com and we are hosting service provider. We have service called “1-click WordPress installer” where we are using /wp-content/install.php to process WP installation with custom UI.PS – We are handling installation via ajax.
Forum: Developing with WordPress
In reply to: Auto/custom login fails since 4.7.4@bcworkz thanks, I will surely try.
Although just checked the purpose of switch_blog and seems it is related to multisite. Our installations are normal sites. Not sure if it is useful or not.Forum: Developing with WordPress
In reply to: Auto/custom login fails since 4.7.4@bcworkz thanks for your reply. I totally understand what you want to say.
I have my custom /wp-content/install.php just changing the look of the installation process.Where I’ve called
wp_installmethod and next I’m setting the cookie usingwp_set_auth_cookiewhich was working nicely before 4.7.4Here is my code snippet –
$result = wp_install( $site_title, $username, $email, $public, $deprecated = '', $password, $language ); if( ! isset( $result[ 'user_id' ] ) || $result[ 'user_id' ] == '' ) { $response[ 'message' ] = 'Not installed'; } else { $login_data = array(); $login_data['user_login'] = $username; $login_data['user_password'] = $password; $login_data['remember'] = true; $user_verify = wp_signon($login_data, true); if (is_wp_error($user_verify)) { $errors[] = 'Invalid username or password. Please try again!'; } else { wp_set_auth_cookie($user_verify->ID); } }Forum: Fixing WordPress
In reply to: Can't change max upload sizeCross check by adding phpinfo.php file on your server.
If phpinfo() shows 8M only then you should connect with your hosting service provider.Cheers!
Forum: Plugins
In reply to: [WordPress Social Login] Change user role at register time.Great! Cheers!
Forum: Plugins
In reply to: [WordPress Social Login] Change user role at register time.Ah! Found the solution!
Action:
wsl_hook_process_login_after_wp_insert_user
Filter:wsl_hook_process_login_alter_redirect_toadd_action('wsl_hook_process_login_after_wp_insert_user', 'wsl_hook_process_login_after_wp_insert_user_callback', 10, 3); function wsl_hook_process_login_after_wp_insert_user_callback($user_id, $provider, $hybridauth_user_profile) { if(//logic) { $u = new WP_User( $user_id ); // Remove role $u->remove_role( 'subscriber' ); // Add role $u->add_role( 'contributor' ); } }To redirect user to different pages use –
add_filter( 'wsl_hook_process_login_alter_redirect_to', 'wsl_hook_process_login_alter_redirect_to_callback' ); function wsl_hook_process_login_alter_redirect_to_callback($redirect_to) { return $redirect_to; }Note – Filter is calling before changing role using above action
Forum: Plugins
In reply to: [WordPress Social Login] Change user role at register time.Hey Shubham,
Did you find your answer?
Please let me know the solution if you have.Forum: Plugins
In reply to: The login_url filter not working in WP 4.4?I’m facing the same problem.
Anyone has a fix for this please post.Forum: Plugins
In reply to: [WordPress Social Login] New User RedirectI’ve added filter in plugin –
File – includes/services/wsl.authentication.php
Line No. – 886$redirect_to = apply_filters('wsl_after_login_redirect_uri', $user_id, $redirect_to);Although I would request plugin author to add above or similar filter which would help to modify redirect url after user logged in.
Cheers π
Forum: Plugins
In reply to: [Shortcode Menu] Make it stickyYou can add in your stylesheet.
If you still couldn’t find any way, please send a message through contact form from your shortcode menu builder page.Forum: Plugins
In reply to: [Shortcode Menu] main menu conflictHope you resolved your issue. I’m marking this thread as resolved.
Forum: Plugins
In reply to: [Shortcode Menu] Make it stickyHope you resolved your issue. I’m marking this thread as resolved.
Forum: Plugins
In reply to: [Shortcode Menu] Make it stickyAbsolutely,
Just add following css
.YOUR_MENU_CLASS {
position:fixed;
top:0;
left:0;
}