in reply to MySQL-pp, Perl and MySQL Triggers

This is an SQL problem. It's looks to me like you need to change 'NEW.ec_user.login.type' to 'NEW.type'.

MySQL 5.7 Trigger Syntax and Examples