Completed
Push — ezp_30797 ( 8198f2...1e476a )
by
unknown
18:51
created

UserService::getPasswordInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * UserService class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\Core\SignalSlot;
10
11
use eZ\Publish\API\Repository\UserService as UserServiceInterface;
12
use eZ\Publish\API\Repository\Values\Content\Content;
13
use eZ\Publish\API\Repository\Values\User\PasswordInfo;
14
use eZ\Publish\API\Repository\Values\User\PasswordValidationContext;
15
use eZ\Publish\API\Repository\Values\User\UserTokenUpdateStruct;
16
use eZ\Publish\API\Repository\Values\User\UserGroupCreateStruct;
17
use eZ\Publish\API\Repository\Values\User\UserGroupUpdateStruct;
18
use eZ\Publish\API\Repository\Values\User\UserCreateStruct;
19
use eZ\Publish\API\Repository\Values\User\UserGroup;
20
use eZ\Publish\API\Repository\Values\User\User;
21
use eZ\Publish\API\Repository\Values\User\UserUpdateStruct;
22
use eZ\Publish\Core\SignalSlot\Signal\UserService\CreateUserGroupSignal;
23
use eZ\Publish\Core\SignalSlot\Signal\UserService\DeleteUserGroupSignal;
24
use eZ\Publish\Core\SignalSlot\Signal\UserService\MoveUserGroupSignal;
25
use eZ\Publish\Core\SignalSlot\Signal\UserService\UpdateUserTokenSignal;
26
use eZ\Publish\Core\SignalSlot\Signal\UserService\UpdateUserGroupSignal;
27
use eZ\Publish\Core\SignalSlot\Signal\UserService\CreateUserSignal;
28
use eZ\Publish\Core\SignalSlot\Signal\UserService\DeleteUserSignal;
29
use eZ\Publish\Core\SignalSlot\Signal\UserService\UpdateUserSignal;
30
use eZ\Publish\Core\SignalSlot\Signal\UserService\AssignUserToUserGroupSignal;
31
use eZ\Publish\Core\SignalSlot\Signal\UserService\UnAssignUserFromUserGroupSignal;
32
33
/**
34
 * UserService class.
35
 */
36
class UserService implements UserServiceInterface
37
{
38
    /**
39
     * Aggregated service.
40
     *
41
     * @var \eZ\Publish\API\Repository\UserService
42
     */
43
    protected $service;
44
45
    /**
46
     * SignalDispatcher.
47
     *
48
     * @var \eZ\Publish\Core\SignalSlot\SignalDispatcher
49
     */
50
    protected $signalDispatcher;
51
52
    /**
53
     * Constructor.
54
     *
55
     * Construct service object from aggregated service and signal
56
     * dispatcher
57
     *
58
     * @param \eZ\Publish\API\Repository\UserService $service
59
     * @param \eZ\Publish\Core\SignalSlot\SignalDispatcher $signalDispatcher
60
     */
61
    public function __construct(UserServiceInterface $service, SignalDispatcher $signalDispatcher)
62
    {
63
        $this->service = $service;
64
        $this->signalDispatcher = $signalDispatcher;
65
    }
66
67
    /**
68
     * Creates a new user group using the data provided in the ContentCreateStruct parameter.
69
     *
70
     * In 4.x in the content type parameter in the profile is ignored
71
     * - the content type is determined via configuration and can be set to null.
72
     * The returned version is published.
73
     *
74
     * @param \eZ\Publish\API\Repository\Values\User\UserGroupCreateStruct $userGroupCreateStruct a structure for setting all necessary data to create this user group
75
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $parentGroup
76
     *
77
     * @return \eZ\Publish\API\Repository\Values\User\UserGroup
78
     *
79
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to create a user group
80
     * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the input structure has invalid data
81
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException if a field in the $userGroupCreateStruct is not valid
82
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentValidationException if a required field is missing or set to an empty value
83
     */
84
    public function createUserGroup(UserGroupCreateStruct $userGroupCreateStruct, UserGroup $parentGroup)
85
    {
86
        $returnValue = $this->service->createUserGroup($userGroupCreateStruct, $parentGroup);
87
        $this->signalDispatcher->emit(
88
            new CreateUserGroupSignal(
89
                [
90
                    'userGroupId' => $returnValue->id,
91
                ]
92
            )
93
        );
94
95
        return $returnValue;
96
    }
97
98
    /**
99
     * Loads a user group for the given id.
100
     *
101
     * @param mixed $id
102
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
103
     *
104
     * @return \eZ\Publish\API\Repository\Values\User\UserGroup
105
     *
106
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to create a user group
107
     * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if the user group with the given id was not found
108
     */
109
    public function loadUserGroup($id, array $prioritizedLanguages = [])
110
    {
111
        return $this->service->loadUserGroup($id, $prioritizedLanguages);
112
    }
113
114
    /**
115
     * Loads the sub groups of a user group.
116
     *
117
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
118
     * @param int $offset the start offset for paging
119
     * @param int $limit the number of user groups returned
120
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
121
     *
122
     * @return \eZ\Publish\API\Repository\Values\User\UserGroup[]
123
     *
124
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to read the user group
125
     */
126
    public function loadSubUserGroups(UserGroup $userGroup, $offset = 0, $limit = 25, array $prioritizedLanguages = [])
127
    {
128
        return $this->service->loadSubUserGroups($userGroup, $offset, $limit, $prioritizedLanguages);
129
    }
130
131
    /**
132
     * Removes a user group.
133
     *
134
     * the users which are not assigned to other groups will be deleted.
135
     *
136
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
137
     *
138
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to create a user group
139
     */
140 View Code Duplication
    public function deleteUserGroup(UserGroup $userGroup)
141
    {
142
        $returnValue = $this->service->deleteUserGroup($userGroup);
143
        $this->signalDispatcher->emit(
144
            new DeleteUserGroupSignal(
145
                [
146
                    'userGroupId' => $userGroup->id,
147
                    'affectedLocationIds' => $returnValue,
148
                ]
149
            )
150
        );
151
152
        return $returnValue;
153
    }
154
155
    /**
156
     * Moves the user group to another parent.
157
     *
158
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
159
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $newParent
160
     *
161
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to move the user group
162
     */
163 View Code Duplication
    public function moveUserGroup(UserGroup $userGroup, UserGroup $newParent)
164
    {
165
        $returnValue = $this->service->moveUserGroup($userGroup, $newParent);
166
        $this->signalDispatcher->emit(
167
            new MoveUserGroupSignal(
168
                [
169
                    'userGroupId' => $userGroup->id,
170
                    'newParentId' => $newParent->id,
171
                ]
172
            )
173
        );
174
175
        return $returnValue;
176
    }
177
178
    /**
179
     * Updates the group profile with fields and meta data.
180
     *
181
     * 4.x: If the versionUpdateStruct is set in $userGroupUpdateStruct, this method internally creates a content draft, updates ts with the provided data
182
     * and publishes the draft. If a draft is explicitly required, the user group can be updated via the content service methods.
183
     *
184
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
185
     * @param \eZ\Publish\API\Repository\Values\User\UserGroupUpdateStruct $userGroupUpdateStruct
186
     *
187
     * @return \eZ\Publish\API\Repository\Values\User\UserGroup
188
     *
189
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to move the user group
190
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException if a field in the $userGroupUpdateStruct is not valid
191
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentValidationException if a required field is set empty
192
     * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if a field value is not accepted by the field type
193
     */
194
    public function updateUserGroup(UserGroup $userGroup, UserGroupUpdateStruct $userGroupUpdateStruct)
195
    {
196
        $returnValue = $this->service->updateUserGroup($userGroup, $userGroupUpdateStruct);
197
        $this->signalDispatcher->emit(
198
            new UpdateUserGroupSignal(
199
                [
200
                    'userGroupId' => $userGroup->id,
201
                ]
202
            )
203
        );
204
205
        return $returnValue;
206
    }
207
208
    /**
209
     * Create a new user. The created user is published by this method.
210
     *
211
     * @param \eZ\Publish\API\Repository\Values\User\UserCreateStruct $userCreateStruct the data used for creating the user
212
     * @param array $parentGroups the groups of type {@link \eZ\Publish\API\Repository\Values\User\UserGroup} which are assigned to the user after creation
213
     *
214
     * @return \eZ\Publish\API\Repository\Values\User\User
215
     *
216
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to move the user group
217
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException if a field in the $userCreateStruct is not valid
218
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentValidationException if a required field is missing or set  to an empty value
219
     * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if a field value is not accepted by the field type
220
     *                                                                        if a user with provided login already exists
221
     */
222
    public function createUser(UserCreateStruct $userCreateStruct, array $parentGroups)
223
    {
224
        $returnValue = $this->service->createUser($userCreateStruct, $parentGroups);
225
        $this->signalDispatcher->emit(
226
            new CreateUserSignal(
227
                [
228
                    'userId' => $returnValue->id,
229
                ]
230
            )
231
        );
232
233
        return $returnValue;
234
    }
235
236
    /**
237
     * Loads a user.
238
     *
239
     * @param mixed $userId
240
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
241
     *
242
     * @return \eZ\Publish\API\Repository\Values\User\User
243
     *
244
     * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if a user with the given id was not found
245
     */
246
    public function loadUser($userId, array $prioritizedLanguages = [])
247
    {
248
        return $this->service->loadUser($userId, $prioritizedLanguages);
249
    }
250
251
    /**
252
     * Loads anonymous user.
253
     *
254
     * @deprecated since 5.3, use loadUser( $anonymousUserId ) instead
255
     *
256
     * @uses ::loadUser()
257
     *
258
     * @return \eZ\Publish\API\Repository\Values\User\User
259
     */
260
    public function loadAnonymousUser()
261
    {
262
        return $this->service->loadAnonymousUser();
0 ignored issues
show
Deprecated Code introduced by
The method eZ\Publish\API\Repositor...ce::loadAnonymousUser() has been deprecated with message: since 5.3, use loadUser( $anonymousUserId ) instead

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
263
    }
264
265
    /**
266
     * Loads a user for the given login and password.
267
     *
268
     * {@inheritdoc}
269
     *
270
     * @param string $login
271
     * @param string $password the plain password
272
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
273
     *
274
     * @return \eZ\Publish\API\Repository\Values\User\User
275
     *
276
     * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if credentials are invalid
277
     * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if a user with the given credentials was not found
278
     */
279
    public function loadUserByCredentials($login, $password, array $prioritizedLanguages = [])
280
    {
281
        return $this->service->loadUserByCredentials($login, $password, $prioritizedLanguages);
282
    }
283
284
    /**
285
     * Loads a user for the given login.
286
     *
287
     * {@inheritdoc}
288
     *
289
     * @param string $login
290
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
291
     *
292
     * @return \eZ\Publish\API\Repository\Values\User\User
293
     *
294
     * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if a user with the given credentials was not found
295
     */
296
    public function loadUserByLogin($login, array $prioritizedLanguages = [])
297
    {
298
        return $this->service->loadUserByLogin($login, $prioritizedLanguages);
299
    }
300
301
    /**
302
     * Loads a user for the given email.
303
     *
304
     * {@inheritdoc}
305
     *
306
     * @param string $email
307
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
308
     *
309
     * @return \eZ\Publish\API\Repository\Values\User\User[]
310
     */
311
    public function loadUsersByEmail($email, array $prioritizedLanguages = [])
312
    {
313
        return $this->service->loadUsersByEmail($email, $prioritizedLanguages);
314
    }
315
316
    /**
317
     * Loads a user with user hash key.
318
     *
319
     * {@inheritdoc}
320
     *
321
     * @param string $hash
322
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
323
     *
324
     * @return \eZ\Publish\API\Repository\Values\User\User
325
     *
326
     * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if a user with the given hash was not found
327
     */
328
    public function loadUserByToken($hash, array $prioritizedLanguages = [])
329
    {
330
        return $this->service->loadUserByToken($hash, $prioritizedLanguages);
331
    }
332
333
    /**
334
     * This method deletes a user.
335
     *
336
     * @param \eZ\Publish\API\Repository\Values\User\User $user
337
     *
338
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to delete the user
339
     */
340
    public function deleteUser(User $user)
341
    {
342
        $returnValue = $this->service->deleteUser($user);
343
        $this->signalDispatcher->emit(
344
            new DeleteUserSignal(
345
                [
346
                    'userId' => $user->id,
347
                    'affectedLocationIds' => $returnValue,
348
                ]
349
            )
350
        );
351
352
        return $returnValue;
353
    }
354
355
    /**
356
     * Updates a user.
357
     *
358
     * 4.x: If the versionUpdateStruct is set in the user update structure, this method internally creates a content draft, updates ts with the provided data
359
     * and publishes the draft. If a draft is explicitly required, the user group can be updated via the content service methods.
360
     *
361
     * @param \eZ\Publish\API\Repository\Values\User\User $user
362
     * @param \eZ\Publish\API\Repository\Values\User\UserUpdateStruct $userUpdateStruct
363
     *
364
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to update the user
365
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException if a field in the $userUpdateStruct is not valid
366
     * @throws \eZ\Publish\API\Repository\Exceptions\ContentValidationException if a required field is set empty
367
     * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if a field value is not accepted by the field type
368
     *
369
     * @return \eZ\Publish\API\Repository\Values\User\User
370
     */
371
    public function updateUser(User $user, UserUpdateStruct $userUpdateStruct)
372
    {
373
        $returnValue = $this->service->updateUser($user, $userUpdateStruct);
374
        $this->signalDispatcher->emit(
375
            new UpdateUserSignal(
376
                [
377
                    'userId' => $user->id,
378
                ]
379
            )
380
        );
381
382
        return $returnValue;
383
    }
384
385
    /**
386
     * Update the user account key information specified by the user account key struct.
387
     *
388
     * @param \eZ\Publish\API\Repository\Values\User\User $user
389
     * @param \eZ\Publish\API\Repository\Values\User\UserTokenUpdateStruct $userTokenUpdateStruct
390
     *
391
     * @return \eZ\Publish\API\Repository\Values\User\User
392
     */
393
    public function updateUserToken(User $user, UserTokenUpdateStruct $userTokenUpdateStruct)
394
    {
395
        $returnValue = $this->service->updateUserToken($user, $userTokenUpdateStruct);
396
        $this->signalDispatcher->emit(
397
            new UpdateUserTokenSignal(
398
                ['userId' => $user->id]
399
            )
400
        );
401
402
        return $returnValue;
403
    }
404
405
    /**
406
     * Expires user token with user hash.
407
     *
408
     * @param string $hash
409
     */
410
    public function expireUserToken($hash)
411
    {
412
        return $this->service->expireUserToken($hash);
413
    }
414
415
    /**
416
     * Assigns a new user group to the user.
417
     *
418
     * @param \eZ\Publish\API\Repository\Values\User\User $user
419
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
420
     *
421
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to assign the user group to the user
422
     * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is already in the given user group
423
     */
424 View Code Duplication
    public function assignUserToUserGroup(User $user, UserGroup $userGroup)
425
    {
426
        $returnValue = $this->service->assignUserToUserGroup($user, $userGroup);
427
        $this->signalDispatcher->emit(
428
            new AssignUserToUserGroupSignal(
429
                [
430
                    'userId' => $user->id,
431
                    'userGroupId' => $userGroup->id,
432
                ]
433
            )
434
        );
435
436
        return $returnValue;
437
    }
438
439
    /**
440
     * Removes a user group from the user.
441
     *
442
     * @param \eZ\Publish\API\Repository\Values\User\User $user
443
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
444
     *
445
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to remove the user group from the user
446
     * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is not in the given user group
447
     */
448 View Code Duplication
    public function unAssignUserFromUserGroup(User $user, UserGroup $userGroup)
449
    {
450
        $returnValue = $this->service->unAssignUserFromUserGroup($user, $userGroup);
451
        $this->signalDispatcher->emit(
452
            new UnAssignUserFromUserGroupSignal(
453
                [
454
                    'userId' => $user->id,
455
                    'userGroupId' => $userGroup->id,
456
                ]
457
            )
458
        );
459
460
        return $returnValue;
461
    }
462
463
    /**
464
     * Loads the user groups the user belongs to.
465
     *
466
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed read the user or user group
467
     *
468
     * @param \eZ\Publish\API\Repository\Values\User\User $user
469
     * @param int $offset the start offset for paging
470
     * @param int $limit the number of user groups returned
471
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
472
     *
473
     * @return \eZ\Publish\API\Repository\Values\User\UserGroup[]
474
     */
475
    public function loadUserGroupsOfUser(User $user, $offset = 0, $limit = 25, array $prioritizedLanguages = [])
476
    {
477
        return $this->service->loadUserGroupsOfUser($user, $offset, $limit, $prioritizedLanguages);
478
    }
479
480
    /**
481
     * Loads the users of a user group.
482
     *
483
     * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to read the users or user group
484
     *
485
     * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
486
     * @param int $offset the start offset for paging
487
     * @param int $limit the number of users returned
488
     * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object.
489
     *
490
     * @return \eZ\Publish\API\Repository\Values\User\User[]
491
     */
492
    public function loadUsersOfUserGroup(
493
        UserGroup $userGroup,
494
        $offset = 0,
495
        $limit = 25,
496
        array $prioritizedLanguages = []
497
    ) {
498
        return $this->service->loadUsersOfUserGroup(
499
            $userGroup,
500
            $offset,
501
            $limit,
502
            $prioritizedLanguages
503
        );
504
    }
505
506
    /**
507
     * {@inheritdoc}
508
     */
509
    public function isUser(Content $content): bool
510
    {
511
        return $this->service->isUser($content);
512
    }
513
514
    /**
515
     * {@inheritdoc}
516
     */
517
    public function isUserGroup(Content $content): bool
518
    {
519
        return $this->service->isUserGroup($content);
520
    }
521
522
    /**
523
     * Instantiate a user create class.
524
     *
525
     * @param string $login the login of the new user
526
     * @param string $email the email of the new user
527
     * @param string $password the plain password of the new user
528
     * @param string $mainLanguageCode the main language for the underlying content object
529
     * @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType 5.x the content type for the underlying content object. In 4.x it is ignored and taken from the configuration
530
     *
531
     * @return \eZ\Publish\API\Repository\Values\User\UserCreateStruct
532
     */
533
    public function newUserCreateStruct($login, $email, $password, $mainLanguageCode, $contentType = null)
534
    {
535
        return $this->service->newUserCreateStruct($login, $email, $password, $mainLanguageCode, $contentType);
536
    }
537
538
    /**
539
     * Instantiate a user group create class.
540
     *
541
     * @param string $mainLanguageCode The main language for the underlying content object
542
     * @param null|\eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType 5.x the content type for the underlying content object. In 4.x it is ignored and taken from the configuration
543
     *
544
     * @return \eZ\Publish\API\Repository\Values\User\UserGroupCreateStruct
545
     */
546
    public function newUserGroupCreateStruct($mainLanguageCode, $contentType = null)
547
    {
548
        return $this->service->newUserGroupCreateStruct($mainLanguageCode, $contentType);
549
    }
550
551
    /**
552
     * Instantiate a new user update struct.
553
     *
554
     * @return \eZ\Publish\API\Repository\Values\User\UserUpdateStruct
555
     */
556
    public function newUserUpdateStruct()
557
    {
558
        return $this->service->newUserUpdateStruct();
559
    }
560
561
    /**
562
     * Instantiate a new user group update struct.
563
     *
564
     * @return \eZ\Publish\API\Repository\Values\User\UserGroupUpdateStruct
565
     */
566
    public function newUserGroupUpdateStruct()
567
    {
568
        return $this->service->newUserGroupUpdateStruct();
569
    }
570
571
    /**
572
     * {@inheritdoc}
573
     */
574
    public function validatePassword(string $password, PasswordValidationContext $context = null): array
575
    {
576
        return $this->service->validatePassword($password, $context);
577
    }
578
579
    public function getPasswordInfo(User $user): PasswordInfo
580
    {
581
        return $this->service->getPasswordInfo($user);
582
    }
583
}
584