1
I have found a fix to the problem of not having the user_profile deleted when trying to delete a user. The problem is that the profile found in the User object doesn't have the key set so it can't delete itself using it's own key. In Kernel/User.php assignVars($vars) is used to fill either the User object's vars or the Profile vars however the "profileid" doesn't get set. I have edited the following code so that it gets set. I don't know if this introduces any other problems but I don't think so as there is no var "profileid" initiated as part of the creation of XoopsUser so AFAIK a value can't be assigned to it anyway.
function assignVars($vars) {
$uservars = array_keys($this->getVars());
foreach ($vars as $key => $value) {
/* edit the following line to remove || $key == "profileid" */
// if (in_array($key, $uservars) || $key == "profileid") {
if (in_array($key, $uservars)) {
$this->assignVar($key, $value);
}
/*
* Dynamic user profiles - Mith
*/
else {
$this->_profile->assignVar($key, $value);
}
/*
* Dynamic user profiles end
*/
}
}
I hope that makes sense.