Closed (fixed)
Project:
Fancy Login
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
30 Mar 2011 at 12:35 UTC
Updated:
28 Nov 2013 at 13:00 UTC
Jump to comment: Most recent
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
| Comment | File | Size | Author |
|---|---|---|---|
| suc_log.jpg | 6.21 KB | alexbern |
Comments
Comment #1
jaypanVersion 7.x-2.0 of the module shows a message upon login, due to the new method of logging in the user.