当前位置: 首页>>代码示例>>PHP>>正文


PHP delete_usermeta函数代码示例

本文整理汇总了PHP中delete_usermeta函数的典型用法代码示例。如果您正苦于以下问题:PHP delete_usermeta函数的具体用法?PHP delete_usermeta怎么用?PHP delete_usermeta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了delete_usermeta函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: id_delete_user_meta

function id_delete_user_meta($id, $val)
{
    if (function_exists('delete_user_meta')) {
        return delete_user_meta($id, $val);
    }
    return delete_usermeta($id, $val);
}
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:7,代码来源:intensedebate.php

示例2: option_save

 /**
  * Save our custom profile option.
  * @param  int $user_id User ID
  * @return bool         Whether or not the option was successfully saved.
  */
 public function option_save($user_id)
 {
     if (!current_user_can('edit_user', $user_id)) {
         return false;
     }
     if (isset($_POST['snpe_send']) && 'Y' === $_POST['snpe_send']) {
         return update_usermeta($user_id, 'snpe_send', 'Y');
     } else {
         return delete_usermeta($user_id, 'snpe_send');
     }
 }
开发者ID:10up,项目名称:simple-new-post-emails,代码行数:16,代码来源:simple-new-post-emails.php

示例3: wp_new_user_notification

 /**
  * Notify the blog admin of a new user, normally via email.
  *
  * @param int $user_id User ID
  * @param string $plaintext_pass Optional. The user's plaintext password
  */
 function wp_new_user_notification($user_id, $plaintext_pass = '')
 {
     if (isset($_POST["cimy_uef_wp_PASSWORD"])) {
         delete_usermeta($user_id, 'default_password_nag');
     }
     if (!is_multisite()) {
         $options = cimy_get_options();
         if (!$options["confirm_email"]) {
             wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"]);
         } else {
             if (!isset($_POST["cimy_uef_wp_PASSWORD"])) {
                 delete_usermeta($user_id, 'default_password_nag');
             }
         }
     } else {
         wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"]);
     }
 }
开发者ID:jayfresh,项目名称:SweetSpot,代码行数:24,代码来源:cimy_uef_email_handler.php

示例4: openid_profile_update

function openid_profile_update($user_id)
{
    if (empty($_POST['openid_delegate'])) {
        delete_usermeta($user_id, 'openid_delegate');
    } else {
        $old_delegate = get_usermeta($user_id, 'openid_delegate');
        $delegate = Auth_OpenID::normalizeUrl($_POST['openid_delegate']);
        if (openid_server_update_delegation_info($user_id, $delegate)) {
            openid_message(sprintf(__('Gathered OpenID information for delegate URL %s', 'openid'), '<strong>' . $delegate . '</strong>'));
            openid_status('success');
        } else {
            openid_message(sprintf(__('Unable to find any OpenID information for delegate URL %s', 'openid'), '<strong>' . $delegate . '</strong>'));
            openid_status('error');
        }
    }
}
开发者ID:alx,项目名称:alexgirard.com-blog,代码行数:16,代码来源:admin_panels.php

示例5: ValidateUser

 function ValidateUser()
 {
     global $wpdb;
     $regplus = get_option('register_plus');
     if ($regplus['admin_verify'] && isset($_GET['checkemail'])) {
         echo '<p style="text-align:center;">' . __('Your account will be reviewed by an administrator and you will be notified when it is activated.', 'regplus') . '</p>';
     } else {
         if ($regplus['email_verify'] && isset($_GET['checkemail'])) {
             echo '<p style="text-align:center;">' . __('Please activate your account using the verification link sent to your email address.', 'regplus') . '</p>';
         }
     }
     if ($regplus['email_verify'] && isset($_GET['regplus_verification'])) {
         $regplus = get_option('register_plus');
         $verify_key = $_GET['regplus_verification'];
         $user_id = $wpdb->get_var("SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = 'email_verify' AND meta_value='{$verify_key}'");
         if ($user_id) {
             $login = get_usermeta($user_id, 'email_verify_user');
             $wpdb->query("UPDATE {$wpdb->users} SET user_login = '{$login}' WHERE ID = '{$user_id}'");
             delete_usermeta($user_id, 'email_verify_user');
             delete_usermeta($user_id, 'email_verify');
             delete_usermeta($user_id, 'email_verify_date');
             $msg = '<p>' . sprintf(__('Thank you %s, your account has been verified, please login.', 'regplus'), $login) . '</p>';
             echo $msg;
         }
     }
 }
开发者ID:swena,项目名称:Online-Magazine-Website,代码行数:26,代码来源:register-plus.php

示例6: wordbooker_option_manager

function wordbooker_option_manager()
{
    global $ol_flash, $wordbooker_settings, $_POST, $wp_rewrite, $user_ID, $wpdb, $blog_id, $wordbooker_user_settings_id, $wordbooker_hook;
    echo '<div class="wrap">';
    echo '<h2>' . WORDBOOKER_APPLICATION_NAME . " " . __('Options Page', 'wordbooker') . ' </h2>';
    if (isset($_POST["reset_user_config"])) {
        wordbooker_delete_userdata();
    }
    $wordbooker_settings = wordbooker_options();
    if (isset($wordbooker_settings['wordbooker_disabled'])) {
        echo "<div align='center'><b> " . __('WARNING : Wordbooker is DISABLED', 'wordbooker') . "</b></div>";
    } else {
        if (isset($wordbooker_settings['wordbooker_fake_publish'])) {
            echo "<div align='center'><b> " . __('WARNING : Wordbooker is in TEST mode - NO Posts will be made to Facebook', 'wordbooker') . "</b></div>";
        }
    }
    if ($wordbooker_settings['wordbooker_comment_cron'] != wp_get_schedule('wb_comment_job')) {
        $dummy = wp_clear_scheduled_hook('wb_comment_job');
        $sql = "Delete from " . WORDBOOKER_POSTCOMMENTS . " where in_out='stat'";
        $wpdb->query($sql);
        if ($wordbooker_settings['wordbooker_comment_cron'] == 'Never' || $wordbooker_settings['wordbooker_comment_cron'] == 'Manual') {
        } else {
            $dummy = wp_schedule_event(time(), $wordbooker_settings['wordbooker_comment_cron'], 'wb_comment_job');
        }
    }
    //Set some defaults:
    # If the closedboxes are not set then lets set them up - General Options open, all the rest closed
    $wordbooker_settings = wordbooker_options();
    $wb_boxes = get_usermeta($user_ID, 'closedpostboxes_settings_page_wordbooker');
    if (count($wb_boxes) == 0) {
        $wb_boxes[0] = 'wb_opt2';
        $wb_boxes[1] = 'wb_opt3';
        $wb_boxes[2] = 'wb_opt4';
        update_user_meta($user_ID, 'closedpostboxes_settings_page_wordbooker', $wb_boxes);
    }
    if (!wbs_retrieve_hash()) {
        $temp_hash = wbs_generate_hash();
        wbs_store_hash($temp_hash);
    }
    #var_dump($wordbooker_settings);
    // If no default author set, lets set it
    if (!isset($wordbooker_settings["wordbooker_default_author"])) {
        $wordbooker_settings["wordbooker_default_author"] = 0;
    }
    // If no attribute set, then set it.
    if (!isset($wordbooker_settings["wordbooker_attribute"])) {
        $wordbooker_settings["wordbooker_attribute"] = __("Posted a new post on their blog", 'wordbooker');
    }
    // If no Status line text, then set it
    if (!isset($wordbooker_settings["wordbooker_status_update_text"])) {
        $wordbooker_settings["wordbooker_status_update_text"] = __(": New blog post :  %title% - %link%", 'wordbooker');
    }
    // No Share link set, then set it
    if (!isset($wordbooker_settings["wordbooker_actionlink"])) {
        $wordbooker_settings["wordbooker_actionlink"] = 300;
    }
    // No extract length
    if (!isset($wordbooker_settings['wordbooker_extract_length'])) {
        $wordbooker_settings['wordbooker_extract_length'] = 256;
    }
    if (!isset($wordbooker_settings['wordbooker_page_post'])) {
        $wordbooker_settings['wordbooker_page_post'] = -100;
    }
    if (!isset($wordbooker_settings['wordbooker_advanced_diagnostics_level'])) {
        $wordbooker_settings['wordbooker_advanced_diagnostics_level'] = 99;
    }
    // Generate meta Description
    if (!isset($wordbooker_settings['wordbooker_description_meta_length'])) {
        $wordbooker_settings['wordbooker_description_meta_length'] = '350';
    }
    if (!isset($wordbooker_settings['wordbooker_meta_tag_scan'])) {
        $wordbooker_settings['wordbooker_meta_tag_scan'] = "image,thumb,Thumbnail";
    }
    // Now lets write those setting back.;
    wordbooker_set_options($wordbooker_settings);
    $wordbooker_user_settings_id = "wordbookuser" . $blog_id;
    echo '<div class="wrap">';
    if (isset($_POST['user_meta'])) {
        // Now we check the hash, to make sure we are not getting CSRF
        if (wbs_is_hash_valid($_POST['token'])) {
            foreach (array_keys($_POST) as $key) {
                if (substr($key, 0, 8) == 'wordbook') {
                    $wordbookeruser_settings[$key] = $_POST[$key];
                }
            }
            $encoded_setings = $wordbookeruser_settings;
            #$wordbooker_user_settings_id="wordbookuser".$blog_id;
            update_usermeta($user_ID, $wordbooker_user_settings_id, $encoded_setings);
            if (isset($_POST['rwbus'])) {
                delete_usermeta($user_ID, $wordbooker_user_settings_id);
                $ol_flash = __("Your user level settings have been reset.", 'wordbooker');
            } else {
                $ol_flash = __("Your user level settings have been saved.", 'wordbooker');
            }
        } else {
            // Invalid form hash, possible CSRF attempt
            $ol_flash = __("Security hash missing.", 'wordbooker');
        }
        // endif wbs_is_hash_valid
    }
//.........这里部分代码省略.........
开发者ID:arturo-mayorga,项目名称:am_com,代码行数:101,代码来源:wordbooker_options.php

示例7: bp_media_galleries_remove_data

/**
 * bp_media_galleries_remove_data()
 *
 * It's always wise to clean up after a user is deleted. This stops the database from filling up with
 * redundant information.
 */
function bp_media_galleries_remove_data($user_id)
{
    /* You'll want to run a function here that will delete all information from any component tables
       for this $user_id */
    BP_Media_Galleries_Gallery::delete_by_user_id($user_id);
    BP_Media_Galleries_Media::delete_by_user_id($user_id);
    /* Remember to remove usermeta for this component for the user being deleted */
    delete_usermeta($user_id, 'bp_media_galleries_some_setting');
    do_action('bp_media_galleries_remove_data', $user_id);
}
开发者ID:pixeljar,项目名称:bp-mediagalleries,代码行数:16,代码来源:bp-media-galleries-core.php

示例8: Exception

<?php

try {
    if (!IDMObject::authZ('permission', 'ape_wp_email_reset')) {
        throw new Exception('You are not authorized to reset profiles.');
    }
    require_once '/web/connect.plymouth.edu/wp-includes/registration.php';
    $person = new PSUPerson($_GET['identifier']);
    if (!$person->pidm) {
        throw new Exception('Could not load person for pidm: ' . $_GET['pidm']);
    }
    //end if
    $user = get_userdatabypidm($person->pidm);
    update_usermeta($user->ID, 'psuname', $person->login_name);
    delete_usermeta($user->ID, 'ac_pwreset');
    $response['message'] = 'WP psuname has been synched.';
    $email = trim($_GET['email']);
    if ($email) {
        if ($_GET['type'] == 'primary') {
            $user_data = array('ID' => $user->ID, 'user_email' => $email);
            $which = "Email";
            $old_email = $user->user_email;
            $result = wp_update_user((array) $user_data);
        } else {
            $which = "Alt. email";
            $old_email = $user->email_alt;
            $result = update_usermeta($user->ID, 'email_alt', $email);
        }
        if ($result) {
            $response['message'] .= sprintf(' %s changed from "%s" to "%s"', $which, $old_email, $email);
        }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:31,代码来源:reset_email.php

示例9: bp_core_delete_avatar

function bp_core_delete_avatar()
{
    $user_id = get_current_user_id();
    $old_v1 = get_usermeta($user_id, 'bp_core_avatar_v1_path');
    $old_v2 = get_usermeta($user_id, 'bp_core_avatar_v2_path');
    delete_usermeta($user_id, 'bp_core_avatar_v1_path');
    delete_usermeta($user_id, 'bp_core_avatar_v2_path');
    delete_usermeta($user_id, 'bp_core_avatar_v1');
    delete_usermeta($user_id, 'bp_core_avatar_v2');
    // Remove the actual images
    @unlink($old_v1);
    @unlink($old_v2);
    do_action('bp_core_delete_avatar', $user_id, $old_v1, $old_v2);
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:14,代码来源:bp-core-avatars.php

示例10: wpmuUserFormLdapOptionUpdate

/**
 * Updates ldap_auth user meta value based on option selected on the edit user form 
 */
function wpmuUserFormLdapOptionUpdate()
{
    global $user_id, $current_user;
    if ($user_id == 1 || !is_super_admin()) {
        return;
    }
    if ($_POST['ldapAccountType'] == 'LDAP') {
        update_usermeta($user_id, 'ldap_login', 'true');
    } else {
        delete_usermeta($user_id, 'ldap_login');
    }
}
开发者ID:alexandreaguiar,项目名称:wpmu-ldap-auth,代码行数:15,代码来源:wpmu_ldap_admin.functions.php

示例11: tdomf_uninstall

function tdomf_uninstall()
{
    tdomf_reset_options();
    echo "<span style='width:200px;'>";
    _e("Removing info from all users (this may take a few minutes depending on number of users)... ", "tdomf");
    echo "</span>";
    $users = tdomf_get_all_users();
    foreach ($users as $user) {
        delete_usermeta($user->ID, TDOMF_KEY_FLAG);
        delete_usermeta($user->ID, TDOMF_KEY_STATUS);
    }
    echo "<span style='color:green;'>";
    _e("DONE", "tdomf");
    echo "</span><br/>";
    // This includes v0.6 options!
    //
    echo "<span style='width:200px;'>";
    _e("Removing info from all posts (this may take a few minutes depending on number of posts)... ", "tdomf");
    echo "</span>";
    $posts = tdomf_get_all_posts();
    foreach ($posts as $post) {
        delete_option(TDOMF_NOTIFY . $post->ID);
        delete_post_meta($post->ID, TDOMF_KEY_NOTIFY_EMAIL);
        delete_post_meta($post->ID, TDOMF_KEY_FLAG);
        delete_post_meta($post->ID, TDOMF_KEY_NAME);
        delete_post_meta($post->ID, TDOMF_KEY_EMAIL);
        delete_post_meta($post->ID, TDOMF_KEY_WEB);
        delete_post_meta($post->ID, TDOMF_KEY_IP);
        delete_post_meta($post->ID, TDOMF_KEY_USER_ID);
        delete_post_meta($post->ID, TDOMF_KEY_USER_NAME);
        delete_post_meta($post->ID, TDOMF_KEY_LOCK);
    }
    echo "<span style='color:green;'>";
    _e("DONE", "tdomf");
    echo "</span><br/>";
}
开发者ID:TheReaCompany,项目名称:pooplog,代码行数:36,代码来源:tdomf-uninstall.php

示例12: wpu_map_killusermeta

function wpu_map_killusermeta($intID)
{
    //update usermeta on WP side
    if (function_exists('delete_user_meta')) {
        @delete_user_meta($intID, 'phpbb_userid');
        @delete_user_meta($intID, 'phpbb_userLogin');
    } else {
        @delete_usermeta($intID, 'phpbb_userid');
        @delete_usermeta($intID, 'phpbb_userLogin');
    }
}
开发者ID:snitchashor,项目名称:wp-united,代码行数:11,代码来源:settings-panel.php

示例13: ymind_admin_update

function ymind_admin_update()
{
    $return = false;
    if (isset($_GET['unlock'])) {
        update_usermeta($_GET['unlock'], 'ymind_locked_out', 0);
        delete_usermeta($_GET['unlock'], 'ymind_activation_key');
        $msg = '' . __('User has now been unlocked', 'ymind') . '.';
        ymind_display_message($msg);
    }
    if (isset($_POST['submit'])) {
        $error = array();
        $numerical_fields = array('timeout_logins' => '' . __('Lockout Login Count', 'ymind') . '', 'timeout_minutes' => '' . __('Lockout Login Minutes', 'ymind') . '', 'lockout_minutes' => '' . __('Lockout Minutes', 'ymind') . '');
        $textual_fields = array('new_url' => '' . __('Redirect URL', 'ymind') . '', 'mail_subject' => '' . __('Email Subject', 'ymind') . '', 'mail_message' => '' . __('Email Message', 'ymind') . '', 'login_error' => '' . __('Login Error', 'ymind') . '', 'activate_redirect' => '' . __('Activation Redirect', 'ymind') . '');
        if ($_POST['email_offender'] == 0 && $_POST['timeout_minutes'] > $_POST['lockout_minutes']) {
            $error[] = '' . __('Locked out minutes must be greater than the number of minutes it takes to lock someone out.', 'ymind') . '';
        }
        foreach ($numerical_fields as $key => $label) {
            if (!is_numeric($_POST[$key])) {
                $error[] = '' . __('Expecting a number for', 'ymind') . ' ' . $label;
            }
        }
        foreach ($textual_fields as $key => $label) {
            if (is_numeric($_POST[$key])) {
                $error[] = '' . __('Expecting a string for', 'ymind') . ' ' . $label;
            }
        }
        if (!count($error)) {
            update_option('ymind_redirect_url', $_POST['new_url']);
            update_option('ymind_email_offender', $_POST['email_offender']);
            update_option('ymind_mail_subject', $_POST['mail_subject']);
            update_option('ymind_mail_message', $_POST['mail_message']);
            update_option('ymind_lockout_minutes', $_POST['lockout_minutes']);
            update_option('ymind_timeout_minutes', $_POST['timeout_minutes']);
            update_option('ymind_timeout_logins', $_POST['timeout_logins']);
            update_option('ymind_lockout_option', $_POST['lockout_option']);
            update_option('ymind_locked_out_error', $_POST['login_error']);
            update_option('ymind_activate_redirect', $_POST['activate_redirect']);
            $msg = '' . __('Options have been successfully updated.', 'ymind') . '';
            ymind_display_feedback($msg);
        } else {
            $msg = '<ul style="margin:5px; padding-left: 10px;">';
            foreach ($error as $err) {
                $msg .= '<li>' . $err . '</li>';
            }
            $msg .= '</ul>';
            ymind_display_error($msg);
        }
    }
}
开发者ID:AdultStack,项目名称:ap-members,代码行数:49,代码来源:ymind_admin.include.php

示例14: delete_user_meta

 function delete_user_meta($user_id, $meta_key, $meta_value)
 {
     return delete_usermeta($user_id, $meta_key, $meta_value);
 }
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:4,代码来源:pre-wp3-compatibility.php

示例15: friends_remove_data

function friends_remove_data($user_id)
{
    BP_Friends_Friendship::delete_all_for_user($user_id);
    /* Remove usermeta */
    delete_usermeta($user_id, 'total_friend_count');
    /* Remove friendship requests FROM user */
    bp_core_delete_notifications_from_user($user_id, $bp->friends->slug, 'friendship_request');
    do_action('friends_remove_data', $user_id);
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:9,代码来源:bp-friends.php


注:本文中的delete_usermeta函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。