Hello,

i modified the latest FL a bit. So a message appears when a user successful logs in with its username. See Foto.

Here's what I did in fancy_login.pages.inc for enabling by checkbox in config:

function fancy_login_settings($form, &$form_state) {
...
$form['fancy_login_successful_message'] = array(
      '#title' => t('Display Message after Successful Login'),
      '#type' => 'checkbox',
      '#description' => t('If this Box is checked, a display message appears after a successful login attempt'),
      '#default_value' => variable_get('fancy_login_successful_message', 0),
  );
...
}

and here an implementation of the hook in .module:

/**
 * Implementation of hook_user_login()
 */
function fancy_login_user_login(&$edit, $account) {
   if(variable_get('fancy_login_successful_message',0)){
     drupal_set_message(t('Log in successful for %name.', array('%name' => $account->name)));
    }
}

Some might wan't to have this in their login process maybe.

cheers Alex

CommentFileSizeAuthor
suc_log.jpg6.21 KBalexbern

Comments

jaypan’s picture

Issue summary: View changes
Status: Needs review » Fixed

Version 7.x-2.0 of the module shows a message upon login, due to the new method of logging in the user.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.