Forum Replies Created

Viewing 11 replies - 136 through 146 (of 146 total)
  • Plugin Author pkarjala

    (@pkarjala)

    Tomorrow I will turn on debugging and send a log.

    Thank you, please let me know if you would prefer to send it via email or a more secure channel.

    Could something odd be happening on user log out?

    Potentially; it would be good to see what the user?s role is directly after they log in, and then again after they log out.

    Thank you again for your assistance in hunting down the bug!

    Plugin Author pkarjala

    (@pkarjala)

    When a user logs in for the first time, they are in the Authorizer Approved Users list. I assume this is because “Only approved users (Approved external users and all WordPress users)” is not checked.

    Thank you; this is an important setting to have checked! I?ll change our test environment to automatically approve authenticated users.

    I’m not sure I understand. If I set External > Default role for new users to “Subscriber”, that is the role I expect and want. I see this as a nominal role. Everyone who can authenticate to the site via CAS needs a default and “Subscriber” is it.

    Subsequently, for some users, we want to elevate permissions. This is why I then manually set the user’s role to “Editor”. The issue that we are trying to identify is why that role is reset when the user logs out and then in again, say on the next day.

    Apologies, this is due to my presumption that you had “Only approved users” checked; you may disregard my statements from there.

    We will change over our local test environment to auto-approval and continue working on the issue!

    Plugin Author pkarjala

    (@pkarjala)

    One more thing: For one of the users that logs in and displays this issue, can you pull the role information from the wp_usermeta table, specifically the wp_capabilities meta_key, and post the literal contents the meta_value?

    It should look something like:

    a:1:{s:13:"administrator";b:1;}

    Please let me know if you need assistance with this process.

    Plugin Author pkarjala

    (@pkarjala)

    A few additional questions @mmcglynn:

    Is the “New User Default Role” under Settings -> General the same as the “Default role for new users” under Authorizer -> External Service? Just want to make sure the two are not conflicting.

    When a user logs in for the first time, are they already in the Authorizer Approved Users list, or are they placed in the Pending list and subsequently approved, moving them to the Approved Users list?

    If the user is an Approved User in the Authorizer Access List, but does not yet have a created WordPress account (they have not logged into the site yet), is the desired role set via Authorizer before or after their first login and the WordPress account creation?

    If the user is NOT in the Approved Users list, and ends up in the Pending list, do you set the role before Approving the user, or after? For example, when a new user shows up in the Pending list under Authorizer, you can set the role then approve the user. You can also approve the user, then change their role.

    Finally, when the issue crops up with a user, does it persist it if you delete the user (either via Authorizer or via the WordPress User management) and have them log in again?

    Thanks!

    Plugin Author pkarjala

    (@pkarjala)

    It is fine that “Anyone can register” is unchecked; I am working to make sure we are replicating the same setup on our local test environment to replicate the bug.

    To check, are there a large number of concurrent logins or account generation occurring on your test instance? I realize it?s likely not the case, just trying to rule out one case we?ve been looking at.

    I understand it being a showstopper–roles should not be changing! I?ll be testing throughout this morning HST and should hopefully have an update later today. Thank you for your continued input.

    Plugin Author pkarjala

    (@pkarjala)

    Hi @mmcglynn,

    To clarify, when you say the “User is created by CAS”, this means that they log in via CAS and (with Anyone Can Register set in the WordPress general settings), their account is automatically created?

    Just narrowing down the settings now for internal testing. Thanks!

    Plugin Author pkarjala

    (@pkarjala)

    Hi @aspeagle, can you step through the process in Private/Incognito mode on your web browser? Alternatively, you can also completely clear your cache & cookies.

    If possible, can you also get the HTTP Response headers from your CAS Server (scrubbed of identifying data)? And what CAS version is your server running? This information will assist us further troubleshooting.

    Thanks!

    I also just bumped into this problem. If a user does not specify a specific post_type in the input for the_user_favorites_list, the returned output changes a few moments after it is initially rendered.

    My fix was to pass in the filter array as follows:

    $filters = array(
    		'post_type' => array(
    			'first_type',
    			'second_type',
    			'third_type',
    			'fourth_type',
    		)
    	);
    the_user_favorites_list( $user_id, $site_id = null, true, $filters ); ?>

    IMHO, if the user does not specify a post type, it should grab all posts by default, not inclusive of any custom post types.

    Plugin Author pkarjala

    (@pkarjala)

    Thanks for the pull request. We’ll review it and follow up!

    There’s a project that will support this via JQuery over at https://github.com/sunnywalker/jquery.komohua

    It’s not native to WordPress, but it is an interim solution.

    Thread Starter pkarjala

    (@pkarjala)

    Thanks Aubrey; this is exactly the info I needed to confirm, along with the method to add capability instead of re-creating the user from scratch using add_cap.

    The primary way I’ll be handling it is adding the capabilities to roles in the theme activation hook as suggested, and then using the theme de-activation hook to return users to different roles if the theme is de-activated.

    I’m trying to avoid plugins at this time in order to really learn WP Core better, as I intend to write some plugins later on as I get more familiar with WordPress. I’ll keep the plugin solution in mind in case we run into a time constraint or other problems.

    Thank you again for your help.

Viewing 11 replies - 136 through 146 (of 146 total)