From 82d9c21e1733a849dacd687f75cbc7ceeb46fc8c Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 6 Jul 2013 10:46:52 +1200 Subject: [PATCH] CRM-13014 support userLoginFinalize() for UF classes (fix civimobile) --- CRM/Utils/System/Base.php | 8 ++++++++ CRM/Utils/System/Drupal.php | 9 +++++++++ CRM/Utils/System/Drupal6.php | 9 +++++++++ 3 files changed, 26 insertions(+) diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index 5f7f1b7859..153c7a2607 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -124,5 +124,13 @@ abstract class CRM_Utils_System_Base { function flush() { // nullop by default } + + /** + * Perform an post login activities required by the UF - + * e.g. for drupal: records a watchdog message about the new session, saves the login timestamp, calls hook_user op 'login' and generates a new session. + * @param array $edit: The array of form values submitted by the user. + */ + function userLoginFinalize($edit = array()){ + } } diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index c1652527aa..9010835232 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -652,6 +652,15 @@ AND u.status = 1 return TRUE; } + /** + * Perform an post login activities required by the UF - + * e.g. for drupal: records a watchdog message about the new session, saves the login timestamp, calls hook_user op 'login' and generates a new session. + * @param array $edit: The array of form values submitted by the user. + */ + function userLoginFinalize($edit = array()){ + user_login_finalize(&$edit); + } + /** * Set a message in the UF to display to a user * diff --git a/CRM/Utils/System/Drupal6.php b/CRM/Utils/System/Drupal6.php index e7a3dfe5e7..832a61b934 100644 --- a/CRM/Utils/System/Drupal6.php +++ b/CRM/Utils/System/Drupal6.php @@ -583,6 +583,15 @@ SELECT name, mail return TRUE; } + /** + * Perform an post login activities required by the UF - + * e.g. for drupal : records a watchdog message about the new session, saves the login timestamp, calls hook_user op 'login' and generates a new session. + * @param array $edit: The array of form values submitted by the user. + */ + function userLoginFinalize($edit = array()){ + user_authenticate_finalize(&$edit); + } + /** * Set a message in the UF to display to a user * -- 2.25.1