File: profile-update.php

package info (click to toggle)
wordpress 2.0.10-1etch6
  • links: PTS
  • area: main
  • in suites: etch
  • size: 3,040 kB
  • ctags: 7,377
  • sloc: php: 26,382; sh: 4,645; makefile: 23
file content (33 lines) | stat: -rw-r--r-- 604 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

require_once('admin.php');

check_admin_referer('update-profile_' . $user_ID);

if ( !$_POST )
	die( __('No post?') );

$errors = edit_user($user_ID);

if (count($errors) != 0) {
	foreach ($errors as $id => $error) {
		echo $error . '<br/>';
	}
	exit;
}

if ( !isset( $_POST['rich_editing'] ) )
	$_POST['rich_editing'] = 'false';
update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true );

do_action('personal_options_update');

if ( 'profile' == $_POST['from'] )
	$to = 'profile.php?updated=true';
else
	$to = 'profile.php?updated=true';

wp_redirect( $to );
exit;

?>