jester48
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Create session var in wp_authenticate_user fails@threadi, I found ther issue. The 2FA feature of a plugin appears to be destroying the session, I was able to bypass this by using the transient option described by @alessandro12
Forum: Developing with WordPress
In reply to: Create session var in wp_authenticate_user failsthis is what I have, still no joy
function sbci_start_session() {
if(!session_id()) {
session_start();
}
}
add_action('init', 'sbci_start_session', 1);
function sbci_get_user_pass($user, $password){
if(!session_id()) {
session_start();
}
$_SESSION["pwd"] = $password ;
return $user;
}
add_filter('wp_authenticate_user', 'sbci_get_user_pass',1,2);Forum: Plugins
In reply to: [WP 2FA - Two-factor authentication for WordPress] WP 2FA – On Every Loginthe organization wentr with the paid version of the plugin so I will be asking there for support on this issue.
Thank you for your time and support.
Forum: Plugins
In reply to: [WP 2FA - Two-factor authentication for WordPress] WP 2FA – On Every LoginI have disabled everything but the 2FA and received a critical error.
is it possible top flush the settings on logout ot after x minutes of inactivity so as to force 2fa?
Forum: Plugins
In reply to: [WP 2FA - Two-factor authentication for WordPress] WP 2FA – On Every LoginI uninstalled the plugin, cleared all settings and reinstalled and reconfigured the plugin. Same issue, only asked for authentication on first login, tried with both an admin and basic user on standard browser and on incognito browser.
Forum: Plugins
In reply to: [WP 2FA - Two-factor authentication for WordPress] WP 2FA – On Every Login- Can you try with OTP via email as well (once email sending is enabled on the site)? Even using an email log plugin for the test could confirm if the behavior is the same across methods.
- I will request activation of email on the test server
- You mentioned using incognito – does the same happen in a regular browser session, or in another browser altogether?
- I tried in firefox, same issue, I primarily use chrome
- Since the test environment isn’t configured for email, is there anything else disabled or not configured yet, there that could affect logins (e.g. caching, security plugins)?
- no, i am on the staging site and, with the exception of the email, all settings match production
- Do you see any errors in the browser console or PHP logs when logging in?
- No errors in any logs
- As a deeper test, could you try disabling all other plugins and switching to a default theme, leaving only WP 2FA active? Then re-enable things one by one to see if the issue reappears.
- I will try this option
Also worth checking: sometimes must-use (MU) plugins interfere with the login flow on a lower level – if you have any of those, it’s good to test with them disabled too.
There are no plugins/code in the MU directory
Forum: Plugins
In reply to: [WP 2FA - Two-factor authentication for WordPress] WP 2FA – On Every LoginI am currently locked out, i need to re activate the auth app option, deleting the plugin does not delete the settings.
- This reply was modified 8 months, 2 weeks ago by jester48.
Forum: Plugins
In reply to: [WP 2FA - Two-factor authentication for WordPress] WP 2FA – On Every LoginCan you tell me if you are using the latest 2.9.3 version of the plugin when this occurs? If not, make sure you update the plugin to it’s latest version.
Yes, I have version 2.9.3
can you tell me what 2FA method are you using (OTP via email or via authenticator app) and if this does happen for all users and all 2FA methods?
currently using the authenticator as my test environment is not configured for sending emails, but live environment will be email only
does this happen on the native WordPress log in form as well? If you are using a custom log in form, I suggest trying both and check where this happens and where it’s not.
Yes, the bahaviour is in both the native form and the custom form.
does the behavior “2FA only asked on first login” does get reset at any point (e.g. after some time, or after clearing cookies or changing your browser)? I would like to understand if 2FA is only asked once in total, or once per browser session etc, therefore trying to find a pattern.
I use an incognito window each time I log in, i was prompted for the first login, but never again
Thanks
Forum: Developing with WordPress
In reply to: Get API endpoint to render HTMLI went with the custom page approach.
thanks
Forum: Developing with WordPress
In reply to: Get API endpoint to render HTMLI am trying to make a custom unsubscribe process for users with a specific role, would it be better to use another process?
Forum: Fixing WordPress
In reply to: CPT not listing on edit pageI cant find anything that would block it from displaying
Forum: Developing with WordPress
In reply to: media_handle_upload creates two entriesthanks for the feedback, much appreciated, i’ve been going in circles and needed a fresh set of eyes.
Some of the wp_die blocks were removed after posting, I was still testing and forgot to take them out., the file cleanup block I am still trying to figure out, I rearranged the code a few times trying to determine the cause for the double post creation.
I did var_dumps throughout the code before posting, the duplicate record is created right at the following code block, a var_dump here and and exit then a check of the posts table shows two records created
// upload file
$attachment_id = media_handle_upload( 'mycode-file-upload', 0 );
// move file to secure directory
$moved = rename(get_attached_file( $attachment_id ), $secure_dir . DIRECTORY_SEPARATOR . $base_file_name);
if($moved){
chmod($secure_dir . DIRECTORY_SEPARATOR . $base_file_name, octdec(755));
}I think i have made all the changes you recommended, code can be seen here: https://gist.github.com/james-gerard-rodgers/34a69cb47f81a5208dfa9043d5cbdc08
I asked the chat bot several times for a CSR, customer service rep or a human. It always redirected to the same link as you have provided. It wouldn’t let me complete the form as I could not log in and without logging in I could not get support for a purchased product and I was directed here, that’s why I posted here.
Forum: Fixing WordPress
In reply to: Admin Menu Not Showing Despite Being an Adminthe error message is:
Sorry, you are not allowed to access this page.
I traced the issue to the the function user_can_access_admin_page in /wp-admin/includes/plugin.php and the following values:
- $_wp_submenu_nopriv = array();
- $_wp_menu_nopriv = array();
Forum: Fixing WordPress
In reply to: Two Domains, One WP install – IISbut WP stores the url in the options table, how do i overcome that issue? that’s what I am after, so that guid, image paths etc are managed and work no matter what the domain
- Can you try with OTP via email as well (once email sending is enabled on the site)? Even using an email log plugin for the test could confirm if the behavior is the same across methods.