Hi @all I've a question regarding the ldap integration to drupal. Is there a chance to write a script (command line based) which updates all drupal users ldap data? The thing is simple, if I change a LDAP user data the changes are not updated in drupal until he/she logs in once more... So I wanted a script which I can run via SSH from command line and "fake" a login of all users... so that their data is updated "by hand"... Does anyone have a script like this, or a mechanism which does something like this? Thanks for Help. regards Andreas -- ========================================================================= _____________ / ___________/ Andreas Laesser / //_// /____/ Signal Proc.& Speech Communication Lab. __/ /___/ / __ Graz University of Technology /___//____//__ Inffeldgasse 12 | A-8010 Graz | Austria http://www.spsc.tugraz.at Tel: +43 (0)316 873 -4443 Fax: DW 104439 =========================================================================
You can use drush: http://drupal.org/project/drush drush php-eval yourscript.php you can make use a fully booted Drupal environment in the script then. I guess the ldap module reacts on hook_user_login(), so you can just issue a user_module_invoke('login', $edit, $user); --klausi -- Klaus Purer This E-Mail contains a digital signature and can be verified with this PGP|GPG Public Key: http://web.student.tuwien.ac.at/~e0426223/key/kp.asc
On Friday 22 July 2011 21:55:22 Klaus Purer wrote:
You can use drush: http://drupal.org/project/drush
drush php-eval yourscript.php
you can make use a fully booted Drupal environment in the script then. I guess the ldap module reacts on hook_user_login(), so you can just issue a user_module_invoke('login', $edit, $user);
--klausi
Thanks a lot, I'll try and report if I succeeded. ;-) Andreas -- ========================================================================= _____________ / ___________/ Andreas Laesser / //_// /____/ Signal Proc.& Speech Communication Lab. __/ /___/ / __ Graz University of Technology /___//____//__ Inffeldgasse 12 | A-8010 Graz | Austria http://www.spsc.tugraz.at Tel: +43 (0)316 873 -4443 Fax: DW 104439 =========================================================================
participants (2)
-
Andreas Laesser -
Klaus Purer