Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
User Filters add-on produces error
On the account page, I get this error on top:
Notice: Undefined variable: AccountUserID in /var/www/html/vanilla/extensions/userfilters/default.php on line 24
Also, it does create the links, but it's labeled "'s Activity" instead of "Username's Activity". I don't think the links are good either, it's searching with:
"vanilla/search/?PostBackAction=Search&Type=Discussions&Advanced=1&Keywords=&Categories=&AuthUsername=&btnSubmit=Search"
for discussions, and:
"vanilla/search/?PostBackAction=Search&Keywords=:&Type=Comments&btnSubmit=Search"
for comments.
Anyone else had this problem or knows how to fix this?
0
This discussion has been closed.
Comments
$AccountUserID = ForceIncomingString('u', '');
or$AccountUserID = ForceIncomingString('u', $Context->Session->UserID);
// Don't reload objects if you don't need to (ie. If another extension has already loaded it) if (!@$UserManager) $UserManager = $Context->ObjectFactory->NewContextObject($Context, "UserManager"); $AccountUserID = ForceIncomingInt("u", $Context->Session->UserID);
I just put that in there instead, and it worked. Thanks.
//Define the account that is being viewed $UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager'); $AccountUser = $UserManager->GetUserById($AccountUserID);
//Define the account that is being viewed $UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager'); $AccountUser = $UserManager->GetUserById($AccountUserID);
by
//Define the account that is being viewed // Don't reload objects if you don't need to (ie. If another extension has already loaded it) if (!@$UserManager) $UserManager = $Context->ObjectFactory->NewContextObject($Context, "UserManager"); $AccountUserID = ForceIncomingInt("u", $Context->Session->UserID); $AccountUser = $UserManager->GetUserById($AccountUserID);