Blame Identity/Models/Html/Mantis/1.1.2-1.fc9/account_page.php

4c79b5
4c79b5
# Mantis - a php based bugtracking system
4c79b5
4c79b5
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
4c79b5
# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
4c79b5
4c79b5
# Mantis is free software: you can redistribute it and/or modify
4c79b5
# it under the terms of the GNU General Public License as published by
4c79b5
# the Free Software Foundation, either version 2 of the License, or
4c79b5
# (at your option) any later version.
4c79b5
#
4c79b5
# Mantis is distributed in the hope that it will be useful,
4c79b5
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4c79b5
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4c79b5
# GNU General Public License for more details.
4c79b5
#
4c79b5
# You should have received a copy of the GNU General Public License
4c79b5
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
4c79b5
4c79b5
	# --------------------------------------------------------
4c79b5
	# $Id: account_page.php,v 1.52.2.1 2007-10-13 22:32:01 giallu Exp $
4c79b5
	# --------------------------------------------------------
4c79b5
4c79b5
	# CALLERS
4c79b5
	#	This page is called from:
4c79b5
	#	- print_menu()
4c79b5
	#	- print_account_menu()
4c79b5
	#	- header redirects from account_*.php
4c79b5
	#   - included by verify.php to allow user to change their password
4c79b5
4c79b5
	# EXPECTED BEHAVIOUR
4c79b5
	#	- Display the user's current settings
4c79b5
	#	- Allow the user to edit their settings
4c79b5
	#	- Allow the user to save their changes
4c79b5
	#	- Allow the user to delete their account if account deletion is enabled
4c79b5
4c79b5
	# CALLS
4c79b5
	#	This page calls the following pages:
4c79b5
	#	- account_update.php  (to save changes)
4c79b5
	#	- account_delete.php  (to delete the user's account)
4c79b5
4c79b5
	# RESTRICTIONS & PERMISSIONS
4c79b5
	#	- User must be authenticated
4c79b5
	#	- The user's account must not be protected
4c79b5
4c79b5
	require_once( 'core.php' );
4c79b5
4c79b5
	$t_core_path = config_get( 'core_path' );
4c79b5
4c79b5
	require_once( $t_core_path.'current_user_api.php' );
4c79b5
4c79b5
	#============ Parameters ============
4c79b5
	# (none)
4c79b5
4c79b5
	#============ Permissions ============
4c79b5
	auth_ensure_user_authenticated();
4c79b5
4c79b5
	current_user_ensure_unprotected();
4c79b5
?>
4c79b5
4c79b5
4c79b5
	# extracts the user information for the currently logged in user
4c79b5
	# and prefixes it with u_
4c79b5
	$row = user_get_row( auth_get_current_user_id() );
4c79b5
	extract( $row, EXTR_PREFIX_ALL, 'u' );
4c79b5
4c79b5
	$t_ldap = ( LDAP == config_get( 'login_method' ) );
4c79b5
4c79b5
	# In case we're using LDAP to get the email address... this will pull out
4c79b5
	#  that version instead of the one in the DB
4c79b5
	$u_email = user_get_email( $u_id, $u_username );
4c79b5
	
4c79b5
	# note if we are being included by a script of a different name, if so,
4c79b5
	#  this is a mandatory password change request
4c79b5
	$t_force_pw_reset = is_page_name( 'verify.php' );
4c79b5
4c79b5
	html_page_top1( lang_get( 'account_link' ) );
4c79b5
	html_page_top2();
4c79b5
?>
4c79b5
4c79b5
4c79b5

4c79b5
4c79b5
<center>
4c79b5
		
4c79b5
			echo lang_get( 'verify_warning' ); 
4c79b5
			if ( helper_call_custom_function( 'auth_can_change_password', array() ) ) {
4c79b5
				echo '
' . lang_get( 'verify_change_password' );
4c79b5
			}
4c79b5
		?>
4c79b5
</center>
4c79b5

4c79b5
4c79b5
4c79b5
<form method="post" action="account_update.php">
4c79b5
4c79b5
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
 
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
 
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
			
4c79b5
			*
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			<input type="password" size="32" maxlength="32" name="password" />
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
			
4c79b5
			*
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			<input type="password" size="32" maxlength="32" name="password_confirm" />
4c79b5
		
4c79b5
	
4c79b5
4c79b5
 
4c79b5
4c79b5
 
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
 
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
 
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			<input type="text" size="32" maxlength="64" name="realname" value="<?php echo string_attribute( $u_realname ) ?>" />
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
	
4c79b5
	
4c79b5
		
4c79b5
			
4c79b5
			 * 
4c79b5
			
4c79b5
		
4c79b5
		
4c79b5
		
4c79b5
			<input type="submit" class="button" value="<?php echo lang_get( 'update_user_button' ) ?>" />
4c79b5
		
4c79b5
	
4c79b5
4c79b5
</form>
4c79b5
4c79b5
4c79b5

4c79b5
4c79b5
4c79b5
	# check if users can't delete their own accounts
4c79b5
	if ( ON == config_get( 'allow_account_delete' ) ) {
4c79b5
?>
4c79b5
4c79b5
4c79b5
4c79b5
	<form method="post" action="account_delete.php">
4c79b5
	<input type="submit" class="button" value="<?php echo lang_get( 'delete_account_button' ) ?>" />
4c79b5
	</form>
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5