• Michael

    (@eizzumdm)


    We are experimenting with using wpCAS-w-LDAP with our WP3 multisite blog network.

    I have the following options in my wpcasldap-conf.php file:

    ‘useradd’ => ‘yes’,
    ‘useldap’ => ‘yes’,
    ’email_suffix’ => ‘princeton.edu’,
    ‘userrole’ => ‘subscriber’

    We have the plugin working; however, each time a user logs in via CAS, the user’s role is reset to whatever role is supplied by the ‘userrole’ variable. We want new users to become subscribers when they log in, but we want manually-promoted users to retain their designated role.

    With a test subdirectory blog, I had a colleague who had the site role of Administrator. As soon as he clicked the “Log In” link for that that subdirectory blog and authenticated though CAS, he became a ‘Subscriber.’ I manually changed him back to Administrator. Then I changed ‘userrole’ in the conf file to contributor and repeated the test. With the last test, I set ‘userrole’ to author. Each time, his administrator role became whatever was set as the ‘userrole.’

    Any ideas? Do I have an incorrect setting somewhere?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same thing is happening here. Logins work, but user is reset to default userrole. Makes it kind of hard to be a network admin when you are given ‘subscriber’ role 🙂

    WP 3.2
    wpCAS-w-LDAP
    using CAS version 1.0 for compatibility

    We do not have a config file, but use the admin interface.

    Any ideas for this?

    Thread Starter Michael

    (@eizzumdm)

    We did confirm that the wpCAS-w-LDAP plugin works as intended with the default, single-site setup of WordPress. However, as soon as WordPress 3.2 is configured to use Multisite, the designated user roles are reset upon login to whatever role is supplied by the ‘userrole’ variable.

    josy1024@gmail.com

    (@josy1024gmailcom)

    you can manage the role through ldap:
    code: “wpcas-w-ldap.php”
    function get_user_data() { }
    ‘role’ => $wpcasldap_use_options[‘userrole’],
    change the role type to maybe use an ldap attribute 😉
    eg:
    ‘role’ => $this->data[0][‘customldapattribute’][0],
    ‘role’ => $this->data[0][‘department’][0],

    by the way: i’v have changed your source to work with authenticated binds on ldap servers:

    http://josy1024.blogspot.com/2012/04/wordpress-cas-and-authenticated-ldap.html

    regards josy

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: wpCAS-w-LDAP] Role reset each time a user logs in’ is closed to new replies.