WordPress.org

Ready to get started?Download WordPress

Forums

Active Directory Integration
[resolved] [Active Directory Integration]Update AD Attributes automatically (8 posts)

  1. nic0tin
    Member
    Posted 1 year ago #

    Hello,

    This is not a question but more a feedback.

    I'm using ADI within my intranet organization wordpress website and it works really well. However, I just have one litte recommendation. The class BulkSyncBackADIntegrationPlugin is declared within syncback.php file, but I think it would be better to move it into a new file.

    Due to this choice, I'm facing a really small but ennoying issue. I'm automatically updating AD attributes when clients update their profil information (it's a fully mindful choice) to do so, I hooked a filter function to get_edit_user_link which calls BulkSyncBackADIntegrationPlugin->bulksyncback($userid) when editing an AD user. As I had to include syncback.php, I had to avoid unwanted instructions from being executed. That could be simplified by moving the class BulkSyncBackADIntegrationPlugin into a new file and we wouldn't have to reapply modifications each time their is an update.

    Kind regards :)

    http://wordpress.org/extend/plugins/active-directory-integration/

  2. glatze
    Member
    Plugin Author

    Posted 1 year ago #

    Hi nic0tin,
    thanks for your recommendation. I've moved the class to new file. You can try the development version (1.1.5dev): http://downloads.wordpress.org/plugin/active-directory-integration.zip

  3. nic0tin
    Member
    Posted 1 year ago #

    Hi glatze,
    Thanks for your reply, I'll try it straight away and let you know :)

  4. nic0tin
    Member
    Posted 1 year ago #

    Hi glatze,
    Just so you know, I fixed an issue in bulkimport.php to allow the script to run in a cron job.

    I replaced
    $result = $ADI->bulkimport($authcode);

    By

    $authcode = @$_REQUEST['auth'];
    if(ini_get('register_argc_argv') == 1 && empty($_SERVER['REQUEST_URI'])) { // REQUEST_URI is empty on Windows server when launch via command line (I didn't test with Linux server)
    	if($argc > 0 && !empty($argv[1])) {
    		$authcode = $argv[1];
    	}
    }
    
    // Let's go!
    $result = $ADI->bulkimport($authcode);

    Everything else is working fine :)

  5. jseth
    Member
    Posted 1 year ago #

    This is pretty much WAY over my head, but could you explain what the syncback does? We have an employee intranet also, and our site is hosted remotely. The authentication is slow - 10 to 15 seconds to get logged in, which doesn't sound like a long time unless you're staring at a computer monitor. I was wondering if there is a way to set a cron or something that would sync with our AD Server once a day and cache the passwords so that when the users log in, it would be faster. Thank you.

  6. glatze
    Member
    Plugin Author

    Posted 1 year ago #

    Hi nic0tin,
    your change doesn't work for me on WP 3.5.1 I'm getting warnings and notices.

    The best way to do a cron/Scheduled Task is to call the script by wget. You can download wget for Windows here: http://sourceforge.net/projects/gnuwin32/files/wget/

  7. glatze
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jseth,
    I don't know why the logins take so long. Perhaps establishing the connection between your web server and AD takes this time. In my environment it's much faster (3-5 sec., but still to slow for some people).

    Syncback means that changes made on users in WP are pushed back to AD (e.g. telephone or office).

    Caching passwords in WP is really bad idea (*shiver*) and even impossible since we can not extract them from AD (and that is good).

  8. jseth
    Member
    Posted 1 year ago #

    Hi glatze,
    Perhaps "cache" was the wrong term to use - "sync" would be more of what I'm looking for, hence my curiosity of the Syncback function. I'd be happy with 3-5 seconds, but I know what you mean about even that being slow for some people. Thanks for your reply!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.