@@ -283,9 +283,13 @@ discard block |
||
| 283 | 283 | if( ( $guard = Auth::guard( $gname ) ) && ( $userid = $guard->id() ) ) |
| 284 | 284 | { |
| 285 | 285 | $context->setUser( function() use ( $context, $userid ) { |
| 286 | - try { |
|
| 286 | + try |
|
| 287 | + { |
|
| 287 | 288 | return \Aimeos\MShop::create( $context, 'customer' )->get( $userid, ['group'] ); |
| 288 | - } catch( \Aimeos\MShop\Exception $e ) { // avoid errors if user is assigned to another site |
|
| 289 | + } |
|
| 290 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 291 | + { |
|
| 292 | +// avoid errors if user is assigned to another site |
|
| 289 | 293 | return null; |
| 290 | 294 | } |
| 291 | 295 | } ); |
@@ -295,8 +299,7 @@ discard block |
||
| 295 | 299 | } ); |
| 296 | 300 | |
| 297 | 301 | $context->setEditor( $guard->user()?->email ?: \Request::ip() ); |
| 298 | - } |
|
| 299 | - elseif( $ip = \Request::ip() ) |
|
| 302 | + } elseif( $ip = \Request::ip() ) |
|
| 300 | 303 | { |
| 301 | 304 | $context->setEditor( $ip ); |
| 302 | 305 | } |