Simple LDAP Login
[resolved] fixed multisite support in Simple LDAP Login plugin (7 posts)

  1. mrnipper
    Posted 4 years ago #

    I've made a patch to fix the multisite capabilities of this plugin. I've contacted the author about including this patch also. You can grab the patch here with the md5sum listed here. This is against version of Simple LDAP Login.


  2. mrnipper
    Posted 4 years ago #

    I should also mention that you need to be running at least version 3 of WordPress with this patch. It uses newer functions introduced with version 3 which work regardless of whether single or multi site is being used.

  3. dgreene423
    Posted 4 years ago #

    Do you have an already patched version of the plugin available? I'm not sure what tool I should use to apply the patch.

  4. Xeiran
    Posted 4 years ago #

    Great little patch, pretty simple mod, works great with WP3.4.1, even creates the user correctly if on a sub site and not the original main site.

    @dgreen423 - I'm not a dev so I too had a little trouble understanding how to apply the patch file (uses a patch command from WordPress Subversion version control), then realized it was simple enough I could just manually edit the changes into the Simple LDAP Login plugin. Mostly just changes update_option, get_option and add_option to update_site_option, get_site_option and add_site_option within the two primary PHP files, although there is one function (simpleldap_admin_actions) where one line is swapped out for 4 lines.

  5. johandahl
    Posted 4 years ago #

    To apply the patch you need to do this. Open a terminal on Mac OS X or Linux. cd to the directory containing the simple-ldap-login files. Then execute this command

    patch patch -b -i path-to-simple-ldap-login.multisite.patch

    -b copies the original files to a file with extension .orig
    -i this takes the path to the patch-file. If it is in the same folder it would be just

    patch patch -b -i simple-ldap-login.multisite.patch

    or if it is in the folder above

    patch patch -b -i ../simple-ldap-login.multisite.patch

  6. pako69
    Posted 3 years ago #

    try to patch with : patch patch -b -i simple-ldap-login.multisite.patch
    and got this error :
    patch: **** Can't find file patch : No such file or directory
    All the files are in the same directory :

    ... don't understand... thanks

  7. samling
    Posted 3 years ago #

    @pako69: I just ran into the same issue, turns out you only need to include "patch" once in the command:

    patch -b -i simple-ldap-login.multisite.patch

    Make sure it's in the directory created under plugins/ when you installed simple-ldap-login (should just be called simple-ldap-login/). Running this I get:

    patch -b -i simple-ldap-login.multisite.patch
    patching file Simple-LDAP-Login-Admin.php
    patching file Simple-LDAP-Login.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple LDAP Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic