DragonByte Tech
Well-known member
- Affected version
 - 2.0.9
 
I realise this is something that can be handled by each addon that uses this service, but in my opinion this is still considered a bug because it makes more sense to have this check in the service itself, as opposed to forcing every addon to make the check.
In
	
	
	
		
Add below:
	
	
	
		
This could potentially be a breaking change if an addon relied on the
Fillip
				
			In
src/XF/Service/User/TempChange.php find 
		PHP:
	
	        if ($changeKey !== null)
        {
            $this->expireUserChangeByKey($user, $changeKey);
        }
	Add below:
		PHP:
	
	        if ($expiryDate && $expiryDate < \XF::$time)
        {
            $this->db()->commit();
            return null;
        }
	This could potentially be a breaking change if an addon relied on the
XF:UserChangeTemp entity that was returned, so maybe it would be worth returning an unsaved XF:UserChangeTemp entity instead.Fillip