Skip to content

Commit ec9bb1a

Browse files
Merge pull request #1693 from xwp/release/v4.1.1
Release `4.1.1`
2 parents b4acdc4 + c030a0f commit ec9bb1a

9 files changed

+111
-96
lines changed

changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Stream Changelog
22

3+
## 4.1.1 - February 3, 2025
4+
5+
### Bug fixes
6+
7+
- Fix Two Factor connector issue (in [#1692](https://github.com/xwp/stream/pull/1692))
8+
39
## 4.1.0 - January 20, 2025
410

511
### New features & Enhancements

classes/class-plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Plugin {
2020
*
2121
* @const string
2222
*/
23-
const VERSION = '4.1.0';
23+
const VERSION = '4.1.1';
2424

2525
/**
2626
* WP-CLI command

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"wpackagist-plugin/classic-editor": "1.6.4",
3535
"wpackagist-plugin/easy-digital-downloads": "3.3.1",
3636
"wpackagist-plugin/jetpack": "13.6",
37-
"wpackagist-plugin/two-factor": "0.9.1",
37+
"wpackagist-plugin/two-factor": "0.11.0",
3838
"wpackagist-plugin/user-switching": "1.8.0",
3939
"wpackagist-plugin/wordpress-seo": "23.6",
4040
"wpackagist-plugin/wp-crontrol": "1.17.0",

composer.lock

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

connectors/class-connector-two-factor.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -291,20 +291,25 @@ public function callback_added_user_meta( $meta_id, $user_id, $meta_key, $meta_v
291291
* Callback to watch for 2FA authenticated actions.
292292
*
293293
* @param \WP_User $user Authenticated user.
294-
* @param object $provider The 2FA Provider used.
294+
* @param ?object $provider The 2FA Provider used, null if unknown (this might happen if using older Two Factor plugin version).
295295
*/
296-
public function callback_two_factor_user_authenticated( $user, $provider ) {
296+
public function callback_two_factor_user_authenticated( $user, $provider = null ) {
297297

298298
/* Translators: %s is the Two Factor provider. */
299299
$message = __(
300300
'Authenticated via %s',
301301
'stream'
302302
);
303303

304+
// Get the provider key.
305+
$provider_key = null === $provider
306+
? __( 'unknown Two Factor method', 'stream' )
307+
: $provider->get_key();
308+
304309
$this->log(
305310
$message,
306311
array(
307-
'provider' => $provider->get_key(),
312+
'provider' => $provider_key,
308313
),
309314
$user->ID,
310315
'auth',

0 commit comments

Comments
 (0)