. /** * CALLERS * This page is called from: * - print_menu() * - print_account_menu() * - header redirects from account_*.php * - included by verify.php to allow user to change their password * * EXPECTED BEHAVIOUR * - Display the user's current settings * - Allow the user to edit their settings * - Allow the user to save their changes * - Allow the user to delete their account if account deletion is enabled * * CALLS * This page calls the following pages: * - account_update.php (to save changes) * - account_delete.php (to delete the user's account) * * RESTRICTIONS & PERMISSIONS * - User must be authenticated * - The user's account must not be protected * * @package MantisBT * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org * * @uses core.php * @uses authentication_api.php * @uses config_api.php * @uses constant_inc.php * @uses current_user_api.php * @uses form_api.php * @uses helper_api.php * @uses html_api.php * @uses lang_api.php * @uses ldap_api.php * @uses print_api.php * @uses string_api.php * @uses user_api.php * @uses utility_api.php */ /** * MantisBT Core API's */ require_once( 'core.php' ); require_api( 'authentication_api.php' ); require_api( 'config_api.php' ); require_api( 'constant_inc.php' ); require_api( 'current_user_api.php' ); require_api( 'form_api.php' ); require_api( 'helper_api.php' ); require_api( 'html_api.php' ); require_api( 'lang_api.php' ); require_api( 'ldap_api.php' ); require_api( 'print_api.php' ); require_api( 'string_api.php' ); require_api( 'user_api.php' ); require_api( 'utility_api.php' ); #============ Parameters ============ # (none) #============ Permissions ============ auth_ensure_user_authenticated(); current_user_ensure_unprotected(); # extracts the user information for the currently logged in user # and prefixes it with u_ $row = user_get_row( auth_get_current_user_id() ); extract( $row, EXTR_PREFIX_ALL, 'u' ); $t_ldap = ( LDAP == config_get( 'login_method' ) ); # In case we're using LDAP to get the email address... this will pull out # that version instead of the one in the DB $u_email = user_get_email( $u_id, $u_username ); # note if we are being included by a script of a different name, if so, # this is a mandatory password change request $t_force_pw_reset = is_page_name( 'verify.php' ); # Only show the update button if there is something to update. $t_show_update_button = false; html_page_top( lang_get( 'account_link' ) ); if ( $t_force_pw_reset ) { echo '
'; echo ''; echo '
'; } ?>
class="has-required"> ?>
' . string_display_line( $u_email ) . ''; } else { // Without LDAP $t_show_update_button = true; print_email_input( 'email', $u_email ); } ?>
' . lang_get( 'realname' ) . ''; echo ''; echo ''; echo string_display_line( ldap_realname_from_username( $u_username ) ); echo ''; echo ''; } else { # Without LDAP $t_show_update_button = true; echo ''; echo ''; echo ''; echo ''; } ?>
0 ) { echo '
'; echo '' . lang_get( 'assigned_projects' ) . ''; echo '
'; echo '
    '; foreach( $t_projects AS $t_project_id=>$t_project ) { $t_project_name = string_attribute( $t_project['name'] ); $t_view_state = $t_project['view_state']; $t_access_level = $t_project['access_level']; $t_access_level = get_enum_element( 'access_levels', $t_access_level ); $t_view_state = get_enum_element( 'project_view_state', $t_view_state ); echo '
  • ' . $t_project_name . ' ' . $t_access_level . ' ' . $t_view_state . '
  • '; } echo '
'; echo '
'; echo ''; echo '
'; } ?>