Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Solved] approving new applicants

wiessonwiesson New
edited March 2012 in Vanilla 2.0 - 2.8

i have a strange issue. if i want to approve some new registered applicants, the forum says "The requested record could not be found."

i dont know what to do? should i reinstall my forum and reimport the database?

i've deleted the cache with no usefull results.

(my forum has < 900 members but my php skills aren't very deep, to figure out the problem). If you can get me some hints, it would be nice. :)

Best Answer

  • UnderDogUnderDog MVP
    Answer ✓

    I think you have found a bug. Problem is we need to know the exact steps to reproduce the bug in order to resolve it in the PHP code.

    Role 2 is a guest and Role 4 is an applicant. You can use the forum, because the guest can browse anyway, right? Can you edit things? Report Spam etc.

    You're using Vanilla on a server, correct? Not on your local computer?

    There was an error rendering this rich post.

Answers

  • UnderDogUnderDog MVP
    edited March 2012

    Of course you know that the members are there? Do you see them in your admin section?
    Are you using the latest version of Vanilla? 2.0.18.3

    You don't have to reinstall vanilla, it's a thing that needs to be searched in the sourcecode and we'll figure out, what you need to do.

    Edit:
    Just some Information for problem solving:

       public function Approve($UserID, $Email) {
          $ApplicantRoleID = C('Garden.Registration.ApplicantRoleID', 0);
          
          // Make sure the $UserID is an applicant
          $RoleData = $this->GetRoles($UserID);
          if ($RoleData->NumRows() == 0) {
             throw new Exception(T('ErrorRecordNotFound'));
          } else {
             $AppRoles = $RoleData->Result(DATASET_TYPE_ARRAY);
             $ApplicantFound = FALSE;
             foreach ($AppRoles as $AppRole)
                if (GetValue('RoleID', $AppRole) == $ApplicantRoleID) $ApplicantFound = TRUE;
          }

    Question : How did those users register? Can you show a screenshot of the list of users you want to approve? Maybe erase out important information with a graphics program like photoshop or paint (we don't need screenshots of usernames and email addresses, just need to know what you're looking at on your screen)

    There was an error rendering this rich post.

  • I have the latest version installed and i can see em in the admin section.
    Where i have to put your code? :)

    Pic1

    following:
    Pic2

  • wiesson said:
    Where i have to put your code? :)

    You don't have to put my code anywhere yet :-)
    I was just posting a piece of sourcecode where I found the text that you posted in your opening post.

    ErrorRecordNotFound is from the language definitions file, so it's the exact text from your opening post, ergo, because of the piece of source code, you're getting that error.

    $RoleData = $this->GetRoles($UserID);
    if ($RoleData->NumRows() == 0) {

    That is causing your error. it is probably not finding any roles for the user you wish to approve.

    Are you familiar with looking into a MySQL dataBase with phpMyAdmin?

    There was an error rendering this rich post.

  • Yes i am. I can do simple sql requests in php and i can write simple (non oop) php.

    okay, now I've looked into the database table "GDN_UserRole" and manually changed RoleID 4 to 2. my testuser (myself) is now free to use my forum. hm.

  • UnderDogUnderDog MVP
    Answer ✓

    I think you have found a bug. Problem is we need to know the exact steps to reproduce the bug in order to resolve it in the PHP code.

    Role 2 is a guest and Role 4 is an applicant. You can use the forum, because the guest can browse anyway, right? Can you edit things? Report Spam etc.

    You're using Vanilla on a server, correct? Not on your local computer?

    There was an error rendering this rich post.

  • wiessonwiesson New
    edited March 2012

    thx for help!

    i've installed a new version of vanilla and replaced all roles & UserRoles with the Vanilla defaults (from then new installation) roles. It works very fine now!

  • Question : did you import your posts and users from another forum system? PHPbb maybe? or vBulletin?

    There was an error rendering this rich post.

  • wiessonwiesson New
    edited March 2012

    yes from PHPbb, (a few month ago). i think, now it works fine ;)

Sign In or Register to comment.