https://github.com/fullstack-dev3/wp-imember360-login
Login/Logout Hook for iMember360 Wordpress plugin
https://github.com/fullstack-dev3/wp-imember360-login
customization imember360 login-logout wordpress-hooks wordpress-plugin
Last synced: 11 months ago
JSON representation
Login/Logout Hook for iMember360 Wordpress plugin
- Host: GitHub
- URL: https://github.com/fullstack-dev3/wp-imember360-login
- Owner: fullstack-dev3
- Created: 2022-07-22T06:12:54.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-22T06:14:45.000Z (over 3 years ago)
- Last Synced: 2025-01-05T05:26:17.622Z (about 1 year ago)
- Topics: customization, imember360, login-logout, wordpress-hooks, wordpress-plugin
- Language: PHP
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WP-iMember360-Login
This repo introduces the hooks to login/logout in iMember360 Wordpress plugin.
## i4w_authenticated_login
### Usage:
This hook allows you to run your own code immediately after a user (either a local or an Infusionsoft-based subscriber) has authenticated during the login process.
### Parameters:
iMember360 will pass the following parameters to your action function:
#### $wp_user
is the standard WordPress user object for the person who just logged in.
#### $contact
is an array containing the contact record fields for the person who just logged in.
```bash
email;
$subject = 'Login Notification';
$body = 'Dear ' . $wp_user->user_niceaname . '.\n';
$body .= 'You are logged in successfully.\n';
$headers = array('Content-Type: text/html; charset=UTF-8');
wp_mail( $to, $subject, $body, $headers );
// Updating contact record to reflect the login
$contact->i4w_db_LastUpdated = date('Y-m-d H:i:s');
}
add_action('i4w_authenticated_login', 'my_i4w_authenticated_login',10,2);
}
```