From: <vb...@us...> - 2004-01-03 04:11:16
|
Update of /cvsroot/mantisbt/mantisbt In directory sc8-pr-cvs1:/tmp/cvs-serv31905 Modified Files: account_prefs_reset.php Log Message: Fixed #3479: Reset account preferences of an user results in reset administrators account. M account_prefs_reset.php - The checking that the user is unprotected and the resetting of the preferences was done for the current user rather than the user being modified. Index: account_prefs_reset.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/account_prefs_reset.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- account_prefs_reset.php 15 Feb 2003 10:25:15 -0000 1.23 +++ account_prefs_reset.php 3 Jan 2004 04:11:09 -0000 1.24 @@ -31,15 +31,15 @@ require_once( $t_core_path.'user_pref_api.php' ); #============ Parameters ============ + $f_user_id = gpc_get_int( 'user_id' ); $f_redirect_url = gpc_get_string( 'redirect_url', 'account_prefs_page.php' ); #============ Permissions ============ auth_ensure_user_authenticated(); - current_user_ensure_unprotected(); -?> -<?php - user_pref_set_default( auth_get_current_user_id() ); + user_ensure_unprotected( $f_user_id ); + + user_pref_set_default( $f_user_id ); print_header_redirect( $f_redirect_url ); ?> |