Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
3a3f3b22
Commit
3a3f3b22
authored
Jun 21, 2012
by
Crafton Williams
Committed by
Dan Poltawski
Jul 31, 2012
Browse files
MDL-33869 user_get_user_details: allow return of idnumber
parent
08765665
Changes
3
Hide whitespace changes
Inline
Side-by-side
enrol/externallib.php
View file @
3a3f3b22
...
...
@@ -273,6 +273,7 @@ class core_enrol_external extends external_api {
'msn'
=>
new
external_value
(
PARAM_NOTAGS
,
'msn number'
,
VALUE_OPTIONAL
),
'department'
=>
new
external_value
(
PARAM_TEXT
,
'department'
,
VALUE_OPTIONAL
),
'institution'
=>
new
external_value
(
PARAM_TEXT
,
'institution'
,
VALUE_OPTIONAL
),
'idnumber'
=>
new
external_value
(
PARAM_RAW
,
'An arbitrary ID code number perhaps from the institution'
,
VALUE_OPTIONAL
),
'interests'
=>
new
external_value
(
PARAM_TEXT
,
'user interests (separated by commas)'
,
VALUE_OPTIONAL
),
'firstaccess'
=>
new
external_value
(
PARAM_INT
,
'first access to the site (0 if never)'
,
VALUE_OPTIONAL
),
'lastaccess'
=>
new
external_value
(
PARAM_INT
,
'last access to the site (0 if never)'
,
VALUE_OPTIONAL
),
...
...
user/externallib.php
View file @
3a3f3b22
...
...
@@ -614,6 +614,7 @@ class core_user_external extends external_api {
'msn'
=>
new
external_value
(
PARAM_NOTAGS
,
'msn number'
,
VALUE_OPTIONAL
),
'department'
=>
new
external_value
(
PARAM_TEXT
,
'department'
,
VALUE_OPTIONAL
),
'institution'
=>
new
external_value
(
PARAM_TEXT
,
'institution'
,
VALUE_OPTIONAL
),
'idnumber'
=>
new
external_value
(
PARAM_RAW
,
'An arbitrary ID code number perhaps from the institution'
,
VALUE_OPTIONAL
),
'interests'
=>
new
external_value
(
PARAM_TEXT
,
'user interests (separated by commas)'
,
VALUE_OPTIONAL
),
'firstaccess'
=>
new
external_value
(
PARAM_INT
,
'first access to the site (0 if never)'
,
VALUE_OPTIONAL
),
'lastaccess'
=>
new
external_value
(
PARAM_INT
,
'last access to the site (0 if never)'
,
VALUE_OPTIONAL
),
...
...
user/lib.php
View file @
3a3f3b22
...
...
@@ -405,8 +405,11 @@ function user_get_user_details($user, $course = null, array $userfields = array(
}
}
//Departement/Institution are not displayed on any profile, however you can get them from editing profile.
//Departement/Institution
/Idnumber
are not displayed on any profile, however you can get them from editing profile.
if
(
$isadmin
or
$currentuser
)
{
if
(
in_array
(
'idnumber'
,
$userfields
)
&&
$user
->
idnumber
)
{
$userdetails
[
'idnumber'
]
=
$user
->
idnumber
;
}
if
(
in_array
(
'institution'
,
$userfields
)
&&
$user
->
institution
)
{
$userdetails
[
'institution'
]
=
$user
->
institution
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment