After downloading the invite module for 7.x, and trying to register a new module, the error above appears.
The call to invite_process() is in invite_user_insert() and there is no such function.
Seems that what should be called is invite_process_invite.
Also had a warning about $account->data not being set.
Fix/patch:
diff --git a/sites/all/modules/invite/invite.install b/sites/all/modules/invite/invite.install
old mode 100644
new mode 100755
diff --git a/sites/all/modules/invite/invite.module b/sites/all/modules/invite/invite.module
index c25c5fe..d25824c 100644
--- a/sites/all/modules/invite/invite.module
+++ b/sites/all/modules/invite/invite.module
@@ -478,7 +478,7 @@ function invite_user_insert(&$edit, &$account, $category) {
if ($invite) {
// Process the invitation and assign target roles to the user. These
// will be saved by user_save().
- $roles = invite_process($invite, $account);
+ $roles = invite_process_invite($invite, $account);
if ($roles) {
if (!isset($edit['roles']) || !is_array($edit['roles'])) {
@@ -698,8 +698,14 @@ function invite_get_remaining_invites($account) {
return INVITE_UNLIMITED;
}
- // Check user property for remaining invites.
- $data = unserialize($account->data);
+ if (isset($account->data)) {
+ // Check user property for remaining invites.
+ $data = unserialize($account->data);
+ }
+ else {
+ $data=array();
+ }
+
if (isset($data['invites'])) {
$remaining = $data['invites'];
}
Comments
Comment #1
boran commentedpatch file as attachment
Comment #3
glekli commentedHi Boran,
The first part of the issue has been fixed in http://drupal.org/node/1068328. Could you please post a patch that addresses the second issue only?
Also, could you please describe how you ran into the 'warning about $account->data not being set' error?
Thanks.
Comment #4
glekli commentedComment #5
boran commentedI pulled 2.x HEAD from git.
Issue 1 is fixed as you noted.
I've not yet seen the warning about $account->data, will report back if I get it again. It was probably because PHP 5.3 is used, which is fussy.
I notice other improvements, like 'withdraw' now working - great.
Comment #6
glekli commentedOkay, great. Other refinements may have solved this one along the way.
Please keep us posted, if you ever see it again. Thanks.
Comment #7
glekli commented