} else {
             echo _MD_XOONIPS_ACTIVATE_BY_USER_CERTIFY_MANUAL;
         }
     }
 } else {
     if ($myxoopsConfigUser['activation_type'] == 1) {
         // activate xoops account automatically
         // - To send a e-mail to users who are belong to the group
         //   specified by moderator_gid if certify_user is 'manual'
         if (!$is_certify_auto) {
             // XOOPS : auto, XooNIps : moderator
             xoonips_notification_account_certify_request($newid);
             echo _MD_XOONIPS_ACTIVATE_AUTO_CERTIFY_MANUAL;
         } else {
             // XOOPS : auto, XooNIps : auto
             xoonips_notification_account_certified($newid);
             redirect_header('user.php', 5, _MD_XOONIPS_ACTIVATE_AUTO_CERTIFY_AUTO, false);
         }
     } else {
         if ($myxoopsConfigUser['activation_type'] == 2) {
             // activate xoops accunt by xoops administrator
             $xoopsMailer =& getMailer();
             $xoopsMailer->useMail();
             $xoopsMailer->setTemplate('adminactivate.tpl');
             $xoopsMailer->assign('USERNAME', $uname);
             $xoopsMailer->assign('USEREMAIL', $email);
             $xoopsMailer->assign('USERACTLINK', XOOPS_URL . '/modules/xoonips/user.php?op=actv&id=' . $newid . '&actkey=' . $actkey);
             $xoopsMailer->assign('SITENAME', $myxoopsConfig['sitename']);
             $xoopsMailer->assign('ADMINMAIL', $myxoopsConfig['adminmail']);
             $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
             $member_handler =& xoops_gethandler('member');
     }
 }
 if ($user['activate'] == 1) {
     redirect_header('certifyuser.php', 3, _MD_XOONIPS_ACCOUNT_ALREADY_CERTIFIED . "(" . $user['uname'] . ")");
 }
 $user['activate'] = 1;
 $result = xnp_update_account($xnpsid, $user);
 if ($result != 0) {
     redirect_header('certifyuser.php', 3, _MD_XOONIPS_ACCOUNT_CANNOT_UPDATE_USER_INFO);
     exit;
 }
 // record events(certify account)
 $eventlog_handler =& xoonips_getormhandler('xoonips', 'event_log');
 $eventlog_handler->recordCertifyAccountEvent($certify_uid);
 $xoopsTpl->assign('certified_user', $user);
 xoonips_notification_account_certified($certify_uid);
 //
 // notify a completion of certification to the certified user by e-mail
 //
 $langman =& xoonips_getutility('languagemanager');
 $xoopsMailer =& getMailer();
 $xoopsMailer->useMail();
 $xoopsMailer->setTemplateDir($langman->mail_template_dir());
 $xoopsMailer->setTemplate('xoonips_account_certified.tpl');
 $xoopsMailer->assign('SITENAME', $myxoopsConfig['sitename']);
 $xoopsMailer->assign('ADMINMAIL', $myxoopsConfig['adminmail']);
 $xoopsMailer->assign('SITEURL', XOOPS_URL . "/");
 $xoopsMailer->setToUsers(new XoopsUser($user['uid']));
 $xoopsMailer->setFromEmail($myxoopsConfig['adminmail']);
 $xoopsMailer->setFromName($myxoopsConfig['sitename']);
 $xoopsMailer->setSubject(_MD_XOONIPS_ACCOUNT_CERTIFIED);