本文整理汇总了PHP中useredit_update_picture函数的典型用法代码示例。如果您正苦于以下问题:PHP useredit_update_picture函数的具体用法?PHP useredit_update_picture怎么用?PHP useredit_update_picture使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了useredit_update_picture函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_error
// Pass a true old $user here.
if (!$authplugin->user_update($user, $usernew)) {
// Auth update failed.
print_error('cannotupdateprofile');
}
// Update user with new profile data.
user_update_user($usernew, false, false);
// Update preferences.
useredit_update_user_preference($usernew);
// Update interests.
if (isset($usernew->interests)) {
useredit_update_interests($usernew, $usernew->interests);
}
// Update user picture.
if (empty($CFG->disableuserimages)) {
useredit_update_picture($usernew, $userform, $filemanageroptions);
}
// Update mail bounces.
useredit_update_bounces($user, $usernew);
// Update forum track preference.
useredit_update_trackforums($user, $usernew);
// Save custom profile fields data.
profile_save_data($usernew);
// Trigger event.
\core\event\user_updated::create_from_userid($user->id)->trigger();
// If email was changed and confirmation is required, send confirmation email now to the new address.
if ($emailchanged && $CFG->emailchangeconfirmation) {
$tempuser = $DB->get_record('user', array('id' => $user->id), '*', MUST_EXIST);
$tempuser->email = $usernew->preference_newemail;
$a = new stdClass();
$a->url = $CFG->wwwroot . '/user/emailupdate.php?key=' . $usernew->preference_newemailkey . '&id=' . $user->id;
示例2: get_context_instance
$usercreated = false;
}
$usercontext = get_context_instance(CONTEXT_USER, $usernew->id);
//update preferences
useredit_update_user_preference($usernew);
// update tags
if (!empty($CFG->usetags) and empty($USER->newadminuser)) {
useredit_update_interests($usernew, $usernew->interests);
}
//update user picture
if (!empty($CFG->gdversion) and empty($USER->newadminuser)) {
useredit_update_picture($usernew, $userform);
}
// update mail bounces
useredit_update_bounces($user, $usernew);
// update forum track preference
useredit_update_trackforums($user, $usernew);
// save custom profile fields data
profile_save_data($usernew);
// reload from db
$usernew = $DB->get_record('user', array('id'=>$usernew->id));
// trigger events