# Create new lead $event-\>isNew() return false

**URL:** https://forum.mautic.org/t/create-new-lead-event-isnew-return-false/33405
**Category:** Development
**Tags:** development
**Created:** [September 9, 2024, 5:52am UTC](https://forum.mautic.org/t/create-new-lead-event-isnew-return-false/33405 "2024-09-09T05:52:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![prince\_kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/prince_kumar/32/13384_2.png) [@prince\_kumar](https://forum.mautic.org/u/prince_kumar)
#### Post date: [September 9, 2024, 5:52am UTC](https://forum.mautic.org/t/create-new-lead-event-isnew-return-false/33405/1 "2024-09-09T05:52:49Z")

</div>

**Your software**  
My Mautic version is: 5.0.0  
My PHP version is: 8.1.2

**My question**  
The log output confirms that the event is being triggered, but the `isNew()` condition is evaluating as `false`, meaning the contact is not considered “new” by Mautic at the point when this event is fired.

```auto
public static function getSubscribedEvents()
    {
        return [
            LeadEvents::LEAD_POST_SAVE => 'onContactSave',
        ];
    }

    public function onContactSave(LeadEvent $event)
    {
        $logFile = '/var/www/html/mautic/var/logs/Plugin_log.txt';
        file_put_contents($logFile, 'onContactSave triggered' . PHP_EOL, FILE_APPEND);

	$lead = $event->getLead();
    	file_put_contents($logFile, 'Lead ID: ' . $lead->getId() . PHP_EOL, FILE_APPEND);
if ($event->isNew()) {
        file_put_contents($logFile, 'New contact created: ' . $lead->getName() . PHP_EOL, FILE_APPEND); // Log when the new contact is detected
    } else {
        file_put_contents($logFile, 'This is not a new contact.' . PHP_EOL, FILE_APPEND); // Log if the contact is not new
    }

```
