GB_User::get_data_by
Return only the main user fields
Signature
public function get_data_by(string
$field,
string|int
$value )
Parameters
$field
— string
The field to query against: 'ID', 'email', 'hash' or 'nicename'$value
— object
The field value
Returns
- Raw user object
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
220 - 267 | CyclomaticComplexity | The method get_data_by() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. |
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
220 | 12 | error | Method name "GB_User::get_data_by" is not in camel caps format |
220 | 12 | error | Visibility must be declared on method "get_data_by" |
225 | 13 | error | Inline control structures are not allowed |
232 | 9 | error | Inline control structures are not allowed |
254 | 13 | error | Inline control structures are not allowed |
258 | 9 | error | Inline control structures are not allowed |