diff --git login_one_time.module login_one_time.module index 85e2f2d..8a037da 100755 --- login_one_time.module +++ login_one_time.module @@ -28,6 +28,24 @@ function login_one_time_button($account = NULL, $path = NULL) { } /** + * Implementation of hook_user(). + */ +function login_one_time_user($op, &$edit, &$account, $category = NULL) { + switch ($op) { + case 'view': + if (user_access('send link to login one time')) { + $account->content['login_one_time'] = array( + '#title' => t('One-time login'), + '#type' => 'item', + '#value' => login_one_time_button($account), + '#weight' => 10, + ); + } + break; + } +} + +/** * Form to send a one-time login link */ function login_one_time_button_form($form_state, $account, $path = NULL) {