本文整理汇总了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;
开发者ID:ket-ed,项目名称:ketmoodle-core-changes,代码行数:31,代码来源:edit.php
示例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
开发者ID:nfreear,项目名称:moodle,代码行数:31,代码来源:editadvanced.php
注:本文中的useredit_update_picture函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论