1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8function payment_behavior_cancel_membership_extension($users, $groupId)
9{
10	$userlib = TikiLib::lib('user');
11
12	$users = (array) $users;
13
14	foreach ($users as $u) {
15		$attributelib = TikiLib::lib('attribute');
16		$attributes = $attributelib->get_attributes('user', $u);
17
18		foreach ($attributes as $a) {
19			$attname = 'tiki.memberextend.' . $groupId;
20			if (isset($attributes[$attname])) {
21				$attributelib->set_attribute('user', $u, $attname, '');
22			}
23		}
24	}
25}
26