Skip to:

Single SignOn MediaWiki – User Capitalization

  • LPH2005


    @boonebgorges — or anyone with good coding experience –

    The AuthWP.php ran into a snag today.

    The admin account in wpuser was changed to match my initials (all in capital letters). When the browser is pointed to the mediawiki install then the user id is changed from all capitals to the first being a capital letter and the following are all lowercase. How can this behavior be stopped so that my wpuser account in capitals is matched up with my mediawiki account that is all in capital letters?

    Can AuthWP.php be modified so that the code for matching my userid is inserted.. if $wpuser==LPH (wp-user database) then use LPH (from mediawiki user database – user_id==1)?

    Something like:

    ID == LPH
    return true;`

    This would be added to:

    `function AuthWPUserLoadFromSession($user, &$result) {

    // Is there a WordPress user with a valid session?
    return true;

    wp_die(“Your username ‘”.$wpuser->user_login.”‘ is not a valid MediaWiki username”);
    if(0==$u->getID()) {
    if(!$id) {
    wp_die(“Failed to get ID from name ‘”.$wpuser->user_login.”‘”);
    return true;
    if($id==0) {
    wp_die(“Wikipedia ‘”.$wpuser->user_login.”‘ was not found.”);
    return true;

    return true;

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Single SignOn MediaWiki – User Capitalization’ is closed to new replies.
Skip to toolbar