I have a lot of experience with PHP, etc. but new to Drupal. I would like to know if there is a way in which I could add additional PHP code after the user logs in to the Drupal website. The reason I need to do this is to update the fields in another database (and not in MySQL Drupal DB). I will need to have access to the Drupal website login username and the session cookie created by drupal. I would really appreciate any help.
Create a module and use hook_user to check the login action.
If your module name is mymodule, then create a function called
mymodule_user($op, &$edit, &$account, $category = NULL) { if ($op == 'login') { // Perform your task. } }
: hook_user
$user hook_user, .
Source: https://habr.com/ru/post/1730051/More articles:Options for designing a cache of objects with a stream cache C ++ - c ++Как объяснить провал действия со сложными ограничениями - design-patternsInconsistent availability issue - c #Protocol Buffers and UTF-8 - c ++SharePoint with Content Writing Software for Site Navigation - c #обрезка текстовых строк в jextpane-jery-render-рендерере - javahow to return an IList with members of an arbitrary type - genericsWCF with multiple services and namespace issues - c #Visual Studio 2008 and Oracle 10g - databaseIs there a concept or implementation similar to java RMI in dot net (C #)? - javaAll Articles