When a user logs in, I want to log the user information from the Profile2 module in a separate file.
How can I achieve this?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityWhen a user logs in, I want to log the user information from the Profile2 module in a separate file.
How can I achieve this?
The profiles2 docs state:
Thanks to the foundational entity API the module integrates well with Rules as well as Features.
Install the rules module (http://drupal.org/project/rules) and you should be able to access the profile data after he user login event. To log to the system watchdog with rules you need this patch: http://drupal.org/node/1349882#comment-6190164
This does not write to a separate file, but it would be trivial to extract your entries from the watchdog db table using phpMyAdmin.
And finally it does not require any coding.
_load()
hooks and then save it to file or DB perhaps. – GoodSp33d Jul 9 '12 at 9:11