Giter Club home page Giter Club logo

hypeinvite's Introduction

Invitations for Elgg

Elgg 2.2

Features

  • Allows users to invite new users by email
  • An option to create an invite-only network
  • Keeps track of all invitations to the same email address
  • Creates friend requests when invitations are accepted
  • Group owners can allow members to invite other members
  • Site admins can allow group invitations of non-friends
  • Site admins can allow group invitations by email

Notes

  • Registration must be enabled on the site for this plugin to work
  • In an invite-only network, uservalidationbyemail will be bypassed, as it is assumed that users would have received their invitation code by email
  • When invited by email to group, non-existing users will first have to create an account. Upon registration, invitations will be created for every group the email has been invited to before registration.

Developer Notes

Creating Invites

Other plugins may centralize off-site invitations and attach custom behavior to the invites. For example, to invite non-registered users to an event by their email:

$invite = users_invite_create_user_invite($email);
add_entity_relationship($invite->guid, 'invited_to', $event->guid);
add_entity_relationship($invite->guid, 'invited_by', $inviter->guid);

// generate a registration link to include in the notification
$registration_link = users_invite_get_registration_link($email, $inviter->guid);


// implement a custom handler
elgg_register_plugin_hook_handler('accept', 'invite', function($hook, $type, $return, $params) {

	$invite = $params['invite'];
	$user = $params['user'];

	$events = elgg_get_entities_from_relationship([
        'types' => 'object',
        'subtypes' => 'event',
		'relationship' => 'invited_to',
		'relationship_guid' => $invite->guid,
		'limit' => 0,
	]);

	if (!$events) {
		return;
	}

	foreach ($events as $event) {
		add_entity_relationship($user->guid, 'attending', $event->guid);
	}
});

hypeinvite's People

Contributors

hypejunction avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

merilturock

hypeinvite's Issues

"Your request can not be completed. Please login and confirm the invitation manually"

When sending an invitation to join a hidden group to alredy registered users (seems working fine with not registered), the text message is not added to email notification and the link to join the group causes the error: "Your request can not be completed. Please login and confirm the invitation manually"
Also tried to logout and then opening the link, same error.
Using Hypeinvite 1.0.3 and Elgg 2.3.2
Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.