Skip to content

Commit

Permalink
Fix #3467: Delete user ends up at user not found error.
Browse files Browse the repository at this point in the history
M core/user_api.php
- (user_delete): Delete user record after deleting all its related records (eg: preferences, ...etc).  This is due to user_pref_delete() checking the user table to see if it is projected.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2278 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Dec 17, 2003
1 parent 22d0fc0 commit 97685a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions core/user_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: user_api.php,v 1.62 2003-11-20 10:38:07 vboctor Exp $
# $Id: user_api.php,v 1.63 2003-12-17 22:20:32 vboctor Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -366,14 +366,6 @@ function user_delete( $p_user_id ) {

user_ensure_unprotected( $p_user_id );

$t_user_table = config_get('mantis_user_table');

# Remove account
$query = "DELETE
FROM $t_user_table
WHERE id='$c_user_id'";
db_query( $query );

# Remove associated profiles
user_delete_profiles( $p_user_id );

Expand All @@ -385,6 +377,14 @@ function user_delete( $p_user_id ) {

user_clear_cache( $p_user_id );

$t_user_table = config_get('mantis_user_table');

# Remove account
$query = "DELETE
FROM $t_user_table
WHERE id='$c_user_id'";
db_query( $query );

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion doc/ChangeLog
Expand Up @@ -2,7 +2,7 @@ Mantis ChangeLog

2004.xx.xx - 0.18.1


* Fix #3467: Delete user ends up at user not found error.

2003.12.08 - 0.18.0

Expand Down

0 comments on commit 97685a6

Please sign in to comment.