Skip to content

Commit

Permalink
Set context editor if not null only (#419)
Browse files Browse the repository at this point in the history
Co-authored-by: Artem Zherdev <[email protected]>
  • Loading branch information
zherdev-artem and artemzherdev authored Oct 18, 2021
1 parent 85e0753 commit eac6cc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Aimeos/Shop/Base/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ protected function addUser( \Aimeos\MShop\Context\Item\Iface $context ) : \Aimeo

if( ( $user = Auth::guard( $guard )->user() ) !== null ) {
$context->setEditor( $user->name );
} else {
$context->setEditor( \Request::ip() );
} elseif( $ip = \Request::ip() ) {
$context->setEditor( $ip );
}

return $context;
Expand Down

0 comments on commit eac6cc7

Please sign in to comment.