Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * JobRoller Submit Job Process
- * Processes a job submission.
- *
- *
- * @version 1.0
- * @author AppThemes
- * @package JobRoller
- * @copyright 2010 all rights reserved
- *
- */
- function jr_process_submit_profile_form( /*$success_redirect = '' */) {
- nocache_headers();
- //appthemes_auth_redirect_login();
- global $current_user, $wp_roles, $post, $posted;
- get_currentuserinfo();
- $userdata = wp_get_current_user(); // grabs the user info and puts into vars
- // check to see if the form has been posted. If so, validate the fields
- if(!empty($_POST['submit'])) {
- require_once(ABSPATH . 'wp-admin/includes/user.php');
- require_once(ABSPATH . WPINC . '/registration.php');
- check_admin_referer('update-profile_' . get_current_user_id());
- $errors = edit_user($user_ID);
- $errmsg = '';
- if ( is_wp_error( $errors ) ) foreach( $errors->get_error_messages() as $message ) $errmsg = $message;
- // if there are no errors, then process the ad updates
- if($errmsg == '') {
- // update the user fields
- do_action('personal_options_update', $user_ID);
- // update the custom user fields
- foreach ( array( 'twitter_id', 'facebook_id', 'linkedin_profile' ) as $field )
- update_user_meta($user_ID, $field, strip_tags(stripslashes($_POST[$field])));
- $d_url = $_POST['dashboard_url'];
- wp_redirect( './?updated=true&d='. $d_url );
- } else {
- $errmsg = '<ul class="errors"><li>' . $errmsg . '</li></ul>';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment