diff options
| author | Christian Fowler <spider@viovio.com> | 2009-02-12 19:25:22 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2009-02-12 19:25:22 +0000 |
| commit | 189fa7f947e020a243242c5795186a9ff7482982 (patch) | |
| tree | c109ebaa732e388ebb9cd6b17274a56af9b646fa /admin | |
| parent | e22c403a4d82d16815c99a30e17420c0d8bec1dc (diff) | |
| download | users-189fa7f947e020a243242c5795186a9ff7482982.tar.gz users-189fa7f947e020a243242c5795186a9ff7482982.tar.bz2 users-189fa7f947e020a243242c5795186a9ff7482982.zip | |
add checkbox to delete all of a users content when deleting the user - currently an ALL or NONE approach right now (ie no cherry picking of content types to not be deleted)
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/index.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/admin/index.php b/admin/index.php index 97d6d1f..6f5b1d6 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,5 +1,5 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_users/admin/index.php,v 1.29 2008/10/16 10:22:41 squareing Exp $ +// $Header: /cvsroot/bitweaver/_bit_users/admin/index.php,v 1.30 2009/02/12 19:25:22 spiderr Exp $ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. @@ -103,9 +103,11 @@ if( isset( $_REQUEST["action"] ) ) { $reqUser = new $userClass( $_REQUEST["user_id"] ); switch( $_REQUEST["action"] ){ case 'delete': - if( $reqUser->load() && $reqUser->expunge() ) { + $reqUser->mDb->StartTrans(); + if( $reqUser->load() && $reqUser->expunge( !empty( $_REQUEST['delete_user_content'] ) ? $_REQUEST['delete_user_content'] : NULL ) ) { $feedback['success'][] = tra( 'User deleted' )." <strong>{$userInfo['real_name']} ({$userInfo['login']})</strong>"; } + $reqUser->mDb->CompleteTrans(); break; case 'ban': if( $reqUser->load() && $reqUser->ban() ) { @@ -121,6 +123,11 @@ if( isset( $_REQUEST["action"] ) ) { } else { switch( $_REQUEST["action"] ){ case 'delete': + $formHash['input'][] = "<input type='checkbox' name='delete_user_content' value='all' checked='checked'/>".tra( 'Delete all content created by this user' ); + foreach( $gLibertySystem->mContentTypes as $contentTypeGuid => $contentTypeHash ) { +// $formHash['input'][] = "<input type='checkbox' name='delete_user_content' checked='checked' value='$contentTypeGuid'/>Delete All User's $contentTypeHash[content_description]"; + } + $gBitSystem->setBrowserTitle( tra( 'Delete user' ) ); $msgHash = array( 'confirm_item' => tra( 'Are you sure you want to remove the user?' ), |
