mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			745 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			745 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| declare(strict_types=1);
 | |
| 
 | |
| /*
 | |
|  * Chill is a software for social workers
 | |
|  *
 | |
|  * For the full copyright and license information, please view
 | |
|  * the LICENSE file that was distributed with this source code.
 | |
|  */
 | |
| 
 | |
| namespace Chill\MainBundle\Action\User\UpdateProfile;
 | |
| 
 | |
| use Chill\MainBundle\Entity\User;
 | |
| 
 | |
| final readonly class UpdateProfileCommandHandler
 | |
| {
 | |
|     public function updateProfile(User $user, UpdateProfileCommand $command): void
 | |
|     {
 | |
|         $user->setPhonenumber($command->phonenumber);
 | |
| 
 | |
|         foreach ($command->notificationFlags as $flag => $values) {
 | |
|             $user->setNotificationImmediately($flag, $values['immediate_email']);
 | |
|             $user->setNotificationDailyDigest($flag, $values['daily_digest']);
 | |
|         }
 | |
|     }
 | |
| }
 |