user_storage = $user_storage; } public function register_hook() { add_action( 'wp_login', array( $this, 'save' ) ); } public function save() { try { $this->user_storage->set_last_login_time( time() ); } catch ( User_Not_Found_Exception $e ) { } } }