| 1 |
<?php |
| 2 |
/** |
| 3 |
* userProfileEditForm.php |
| 4 |
* |
| 5 |
* Shows the additional content for the user profile edit form. |
| 6 |
* |
| 7 |
* PHP versions 5 |
| 8 |
* |
| 9 |
* @category UserAccessManager |
| 10 |
* @package UserAccessManager |
| 11 |
* @author Alexander Schneider <alexanderschneider85@googlemail.com> |
| 12 |
* @copyright 2008-2010 Alexander Schneider |
| 13 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 |
| 14 |
* @version SVN: $Id$ |
| 15 |
* @link http://wordpress.org/extend/plugins/user-access-manager/ |
| 16 |
*/ |
| 17 |
|
| 18 |
global $userAccessManager, $wpdb; |
| 19 |
$uamUserGroups = &$userAccessManager->getAccessHandler()->getUserGroups(); |
| 20 |
|
| 21 |
$objectType = 'user'; |
| 22 |
|
| 23 |
if (isset($_GET['user_id'])) { |
| 24 |
$objectId = $_GET['user_id']; |
| 25 |
$editUserData = get_userdata($objectId); |
| 26 |
|
| 27 |
$userGroupsForObject = &$userAccessManager->getAccessHandler()->getUserGroupsForObject( |
| 28 |
$objectType, |
| 29 |
$objectId |
| 30 |
); |
| 31 |
} else { |
| 32 |
$userGroupsForObject = array(); |
| 33 |
} |
| 34 |
|
| 35 |
?> |
| 36 |
<h3><?php echo TXT_UAM_GROUPS; ?></h3> |
| 37 |
<table class="form-table"> |
| 38 |
<tbody> |
| 39 |
<tr> |
| 40 |
<th> |
| 41 |
<label for="usergroups"><?php echo TXT_UAM_SET_UP_USERGROUPS; ?></label> |
| 42 |
</th> |
| 43 |
<td> |
| 44 |
<?php |
| 45 |
if (!$userAccessManager->getAccessHandler()->userIsAdmin($objectId)) { |
| 46 |
include 'groupSelectionForm.php'; |
| 47 |
} else { |
| 48 |
echo TXT_UAM_ADMIN_HINT; |
| 49 |
} |
| 50 |
?> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
</tbody> |
| 54 |
</table> |