mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Removed deprecated event and handlers. (store ip addresses)
This commit is contained in:
		| @@ -19,7 +19,6 @@ use FireflyIII\Events\ConfirmedUser; | ||||
| use FireflyIII\Events\RegisteredUser; | ||||
| use FireflyIII\Events\RequestedNewPassword; | ||||
| use FireflyIII\Events\ResentConfirmation; | ||||
| use FireflyIII\Models\Configuration; | ||||
| use FireflyIII\Repositories\User\UserRepositoryInterface; | ||||
| use FireflyIII\User; | ||||
| use Illuminate\Mail\Message; | ||||
| @@ -36,8 +35,6 @@ use Swift_TransportException; | ||||
|  * | ||||
|  * The method name reflects what is being done. This is in the present tense. | ||||
|  * | ||||
|  * @SuppressWarnings(PHPMD.TooManyPublicMethods) // some of these methods will disappear soon. | ||||
|  * | ||||
|  * @package FireflyIII\Handlers\Events | ||||
|  */ | ||||
| class UserEventHandler | ||||
| @@ -164,42 +161,6 @@ class UserEventHandler | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * When the user is confirmed, this method stores the IP address of the user | ||||
|      * as a preference. Since this preference cannot be edited, it is effectively hidden | ||||
|      * from the user yet stored conveniently. | ||||
|      * | ||||
|      * @param ConfirmedUser $event | ||||
|      * | ||||
|      * @deprecated | ||||
|      * | ||||
|      * @return bool | ||||
|      */ | ||||
|     public function storeConfirmationIpAddress(ConfirmedUser $event): bool | ||||
|     { | ||||
|         Preferences::setForUser($event->user, 'confirmation_ip_address', $event->ipAddress); | ||||
|  | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * This message stores the users IP address on registration, in much the same | ||||
|      * fashion as the previous method. | ||||
|      * | ||||
|      * @param RegisteredUser $event | ||||
|      * | ||||
|      * @deprecated | ||||
|      * | ||||
|      * @return bool | ||||
|      */ | ||||
|     public function storeRegistrationIpAddress(RegisteredUser $event): bool | ||||
|     { | ||||
|         Preferences::setForUser($event->user, 'registration_ip_address', $event->ipAddress); | ||||
|  | ||||
|         return true; | ||||
|  | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param User   $user | ||||
|      * @param string $ipAddress | ||||
|   | ||||
| @@ -37,16 +37,11 @@ class EventServiceProvider extends ServiceProvider | ||||
|     protected $listen | ||||
|         = [ | ||||
|             // new event handlers: | ||||
|             'FireflyIII\Events\ConfirmedUser' => // is a User related event. | ||||
|                 [ | ||||
|                     'FireflyIII\Handlers\Events\UserEventHandler@storeConfirmationIpAddress', | ||||
|                 ], | ||||
|             'FireflyIII\Events\RegisteredUser'       => // is a User related event. | ||||
|                 [ | ||||
|                     'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail', | ||||
|                     'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole', | ||||
|                     'FireflyIII\Handlers\Events\UserEventHandler@sendConfirmationMessage', | ||||
|                     'FireflyIII\Handlers\Events\UserEventHandler@storeRegistrationIpAddress', | ||||
|                 ], | ||||
|             'FireflyIII\Events\RequestedNewPassword' => [ // is a User related event. | ||||
|                                                           'FireflyIII\Handlers\Events\UserEventHandler@sendNewPassword', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user