Hi! I need to execute some PHP after registration of any user. How i can realise that?
Announcement
Collapse
No announcement yet.
Query after adding user
Collapse
X
-
You can use "afterSave" hook for User entity, examples please find at application/Espo/Hooks/
- Likes 1
Comment
-
Thanks! All works fine. For people who need same thing:
1. Create file: your_site/application/Espo/Hooks/User/User.php;
2. Put this code:
<?php
namespace Espo\Hooks\User;
use Espo\ORM\Entity;
class User extends \Espo\Core\Hooks\Base
{
public function afterSave(Entity $entity) //After save USER entity
{
if ($entity->isNew()) //If entity is new (just created)
{
HERE php CODE FOR YOUR NEEDS
}
}
}
?>
Comment
Comment