When user receive invitation, link is like "http://domain/invite/accept/dBffT3FS----------", so reg. code is somethings like "dBffT3FS----------" . But in database reg_code field is varchar(8) - see invite_schema() in invite.install. Only first 8 characters are saved and user receives 404 error page.
We need update database or add next line to invite_load function
function invite_load($code) {
// var_dump($code);
$code = substr($code, 0, 8);
..........
}
It works now!
/**
* Load an invite record for a tracking code.
*
* @param $code
* A registration code to load the invite record for.
* @return
* An invite record.
*/
function invite_load($code) {
// var_dump($code);
$code = substr($code, 0, 8);
$result = db_query("SELECT * FROM {invite} WHERE reg_code = '%s' AND canceled = 0", $code);
if ($invite = db_fetch_object($result)) {
$invite->inviter = user_load(array('uid' => $invite->uid));
$invite->data = (array)unserialize($invite->data);
}
return $invite;
}
Comments
Comment #1
areynolds commentedSounds like the issue is resolved, please re-open if that's not the case.
Comment #2
areynolds commentedComment #3
Vladimir K commentedSorry, real problem was in wrong Mail template at admin/user/invite/settings, E-mail settings section. Someone add "----------" after Replacement pattern [join-link]. I used installation profile from http://openstore.org.ua/. Issue is related only to this distribution.