Completed
Push — milestone/2_0/react-ui ( 6ff089...f420b0 )
by
unknown
05:40
created

User_Meta_Datastore::set_id()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Carbon_Fields\Datastore;
4
5
use Carbon_Fields\Field\Field;
6
7
/**
8
 * User meta datastore class.
9
 */
10
class User_Meta_Datastore extends Meta_Datastore {
11
12
	/**
13
	 * Retrieve the type of meta data.
14
	 *
15
	 * @return string
16
	 */
17
	public function get_meta_type() {
18
		return 'user';
19
	}
20
21
	/**
22
	 * Retrieve the meta table name to query.
23
	 *
24
	 * @return string
25
	 */
26
	public function get_table_name() {
27
		global $wpdb;
28
		return $wpdb->usermeta;
0 ignored issues
show
introduced by
Usage of users/usermeta tables is highly discouraged in VIP context, For storing user additional user metadata, you should look at User Attributes.
Loading history...
29
	}
30
31
	/**
32
	 * Retrieve the meta table field name to query by.
33
	 *
34
	 * @return string
35
	 */
36
	public function get_table_field_name() {
37
		return 'user_id';
38
	}
39
}
40