Is this a bug on activation?

suin
2008-10-15
2013-04-25
  • suin
    suin
    2008-10-15

    I found a line which seems to be a typo in the user-activation process.

    The typo is wrote at the method getDefaultView() in the class "User_UserActivateAction".

    CODE 1
    [code]
            if ($this->mObject->get('level') > 1) {
                $controller->executeRedirect(XOOPS_URL . '/user.php', 3, _MD_USER_MESSAGE_ACONTACT);
            }
    [/code]

    I recognize that if 'level' equal to '1', it means user has been activated.

    So, here the "if phrase" should be scripted like follows :

    CODE 2
    [code]
            if ($this->mObject->get('level') >= 1) {
                $controller->executeRedirect(XOOPS_URL . '/user.php', 3, _MD_USER_MESSAGE_ACONTACT);
            }
    [/code]

    [ja]
    'level'は1以上なら、承認済みユーザなはずです。
    CODE 1ですと、すでにlevelが1のユーザでも承認処理ができてしまいます。
    [/ja]

     
    • GIJOE
      GIJOE
      2008-10-15

      The corresoponding code of X2:

      line 109 of user.php
      [code]
              if ($thisuser->getVar('level') > 0 ) {
                  redirect_header('user.php',5,_US_ACONTACT);
              } else {
      [/code]
      Certainly, it looks just a typo.