File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 28
28
<li ><b >profile_url</b > - URL of the user's Opencaching profile page,</li >
29
29
<li class =' deprecated' >
30
30
<p ><b >is_admin</b > - deprecated
31
- (<a href =' https://github.com/opencaching/okapi/issues/410' >why?</a >).
32
- boolean, true is user has admin privileges.</p >
33
- <p >This value can be accessed only with <b >Level 3</b > Authentication
34
- and only for the user of your Access Token. For all other reads, is_admin
35
- will equal <b >null</b >.</p >
31
+ (<a href =' https://github.com/opencaching/okapi/issues/410' >why?</a >),
32
+ always <b >null</b >.</p >
36
33
</li >
37
34
<li >
38
35
<b >internal_id</b > - internal ID of the user (<b >DO NOT</b > use this!
Original file line number Diff line number Diff line change @@ -59,15 +59,7 @@ public static function call(OkapiRequest $request)
59
59
case 'uuid ' : $ entry ['uuid ' ] = $ row ['uuid ' ]; break ;
60
60
case 'username ' : $ entry ['username ' ] = $ row ['username ' ]; break ;
61
61
case 'profile_url ' : $ entry ['profile_url ' ] = Settings::get ('SITE_URL ' )."viewprofile.php?userid= " .$ row ['user_id ' ]; break ;
62
- case 'is_admin ' :
63
- if (!$ request ->token ) {
64
- $ entry ['is_admin ' ] = null ;
65
- } elseif ($ request ->token ->user_id != $ row ['user_id ' ]) {
66
- $ entry ['is_admin ' ] = null ;
67
- } else {
68
- $ entry ['is_admin ' ] = $ row ['admin ' ] ? true : false ;
69
- }
70
- break ;
62
+ case 'is_admin ' : $ entry ['is_admin ' ] = null ; break ;
71
63
case 'internal_id ' : $ entry ['internal_id ' ] = $ row ['user_id ' ]; break ;
72
64
case 'date_registered ' :
73
65
$ entry ['date_registered ' ] = date ("Y-m-d " , strtotime ($ row ['date_created ' ]));
You can’t perform that action at this time.
0 commit comments