user->invite_state != User::INVITE_STATE_ACTIVATED) { $event->user->invite_state = User::INVITE_STATE_ACTIVATED; $event->user->invite_hash = ''; $event->user->save(); } } }