Skip to content

Commit caad3ac

Browse files
committed
1 parent 8c0dd03 commit caad3ac

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

inc/core/shortcodes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ public static function user( $atts = null, $content = null ) {
14231423
// Define current user ID
14241424
if ( !$atts['user_id'] ) $atts['user_id'] = get_current_user_id();
14251425
// Check user ID
1426-
if ( !is_numeric( $atts['user_id'] ) || $atts['user_id'] < 1 ) return sprintf( '<p class="su-error">User: %s</p>', __( 'user ID is incorrect', 'shortcodes-ultimate' ) );
1426+
if ( !is_numeric( $atts['user_id'] ) || $atts['user_id'] < 0 ) return sprintf( '<p class="su-error">User: %s</p>', __( 'user ID is incorrect', 'shortcodes-ultimate' ) );
14271427
// Get user data
14281428
$user = get_user_by( 'id', $atts['user_id'] );
14291429
// Get user data if user was found

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ For help with premium add-ons, please [open new support ticket](https://getshort
128128
* Removed: 'Cheatsheet' admin menu
129129
* Fixed: [feed] shortcode (now it uses SimplePie)
130130
* Changed default content for [tabs], [row] and [accordion] shortcodes
131+
* Fixed: [user] shortcode works when user is not logged in
131132
* Minor improvements and fixes
132133

133134
= 4.10.2 =

0 commit comments

Comments
 (0)