/**
  *
  * JKN Patch, if naflogin is triggered do the assignments(only triggered when a new user account is created with naf plugin)
  *
  */
 public function handleEvent($a_component, $a_event, $a_parameter)
 {
     if ($a_component == 'Services/Authentication' && ($a_event == 'nafLogin' || $a_event == 'afterLogin')) {
         /**
          * @var $ilUser ilObjUser
          */
         if (is_null($a_parameter['user_obj']) && $a_parameter['username'] !== 'anonymous') {
             $ilUser = new ilObjUser(ilObjUser::getUserIdByLogin($a_parameter['username']));
         } else {
             $ilUser = $a_parameter['user_obj'];
         }
         if ($ilUser instanceof ilObjUser) {
             foreach (ilUserSetting::where(array('status' => ilUserSetting::STATUS_ACTIVE))->get() as $ilUserSetting) {
                 $ilUserSetting->doAssignements($ilUser);
             }
         }
     }
 }