• ResolvedPlugin Author vbonamy

    (@vbonamy)


    Hello,

    I’m using WP Cassify 1.7.5.

    I try to set a role to new user after CAS authenticaition (using “user role settings”) but it fails : no role set to the user even if the rule is ok.

    I think I found 2 mistakes in wp_cassify_plugin.php :

    1. Line 340, the role should be subscriber and not suscriber

    2. Because a user can have only one role (by default), I think $this->wp_cassify_get_roles_to_push( $cas_user_datas, $wp_cassify_user_role_rules ); should be used after array_push( $roles_to_push, 'subscriber' );

    Thank you,
    Vincent.

    https://ww.wp.xz.cn/plugins/wp-cassify/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    You’re totally right ! I’ve modify the code like below in 1.7.7 :

    // Suscriber role is pushed by default to successfully authenticated user
    				if ( count( $roles_to_push ) == 0 ) {
    					array_push( $roles_to_push, 'subscriber' );
    				}
    				else {
    					foreach ( $roles_to_push as $role ) {
    						WP_Cassify_Utils::wp_cassify_set_role_to_wordpress_user( $cas_user_datas[ 'cas_user_id' ], $role );
    					}
    				}

    Can you keep me informed if it solved your problem.

    Best regards

    Plugin Author vbonamy

    (@vbonamy)

    Hello,
    Yes, it works well in 1.7.7 now !!
    Thank you so much for this quick fix and for your plugin 🙂
    See you,
    Vincent.

    Sorry for the bug and thank you very much for your reply.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘User Roles Settings bug’ is closed to new replies.