PluginProbe
Tutor LMS – eLearning and online course solution / 1.0.7
Tutor LMS – eLearning and online course solution v1.0.7
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
tutor / classes / User.php

User.php in Tutor LMS – eLearning and online course solution 1.0.7, at classes/User.php

29 lines 1001 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace TUTOR;
4
5
6 class User {
7
8 public function __construct() {
9 add_action('edit_user_profile', array($this, 'edit_user_profile'));
10 add_action('show_user_profile', array($this, 'edit_user_profile'), 10, 1);
11
12 add_action('profile_update', array($this, 'profile_update'));
13 }
14
15 public function edit_user_profile($user){
16 include tutor()->path.'views/metabox/user-profile-fields.php';
17 }
18
19 public function profile_update($user_id){
20 $_tutor_profile_job_title = sanitize_text_field(tutor_utils()->avalue_dot('_tutor_profile_job_title', $_POST));
21 $_tutor_profile_bio = wp_kses_post(tutor_utils()->avalue_dot('_tutor_profile_bio', $_POST));
22 $_tutor_profile_photo = sanitize_text_field(tutor_utils()->avalue_dot('_tutor_profile_photo', $_POST));
23
24 update_user_meta($user_id, '_tutor_profile_job_title', $_tutor_profile_job_title);
25 update_user_meta($user_id, '_tutor_profile_bio', $_tutor_profile_bio);
26 update_user_meta($user_id, '_tutor_profile_photo', $_tutor_profile_photo);
27 }
28
29 }