69 Commits

Author SHA1 Message Date
Lee Campbell
74866f8f16 MDL-56323 core_user: User profile field default value not on signup page
The default value of a configured text input user profile field is not rendering on signup page
2016-10-24 09:32:32 +01:00
Juan Leyva
3ee392c8e8 MDL-56092 core_user: Changes in profilelib to support WS 2016-10-04 09:50:02 +01:00
David Mudrák
8df850ad6f MDL-46946 user: Make missing required custom fields trigger profile edit
If there is a required custom field that the user can fill by editing
their profile, and that field is missing, the user should be considered
as not fully set up. Instead, we want to redirect them to edit their
profile first.

There are some exceptions when we want to fall back to the previous
behaviour and check just the name and email fields. These exceptional
cases include checking remote user data in incoming MNet request (no
user id, no custom fields supported) and calls to require_login() with
redirecting disabled (typically ajax filepicker requests on profile
editing page itself).

Additional plugins that call the function user_not_fully_set_up()
themselves, should perform the strict check in most/typical cases. So
the strict mode is enabled by default even if it changes the behaviour
slightly. In improbable case of additional plugins relying on the
previous behaviour of the function, they can use the $strict parameter
and keep performing the lax check. However, I am sure the correct fix in
that case will likely be to stop abusing this function.

Note that custom fields are not currently transferred during the MNet
roaming. So having custom fields configured as required on MNet service
provider site (where users can't edit their profiles) is expected to
display an error (as the site is considered as misconfigured).
2016-09-21 17:46:30 +02:00
Frederic Massart
da1296dd07 MDL-53954 user: Prevent locked profile fields from being edited 2016-05-06 09:27:26 +08:00
Marina Glancy
c4d0b752a2 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 12:48:24 +08:00
Juan Leyva
d1b238381f MDL-49499 user: Move events triggering to new API function
New function in profile/lib: profile_viewed()
2015-04-02 16:57:42 +02:00
John Okely
8ef7eade79 MDL-42138 user: Require custom profile fields when registering as guest
Previously when someone registers after logging in as a guest, required
custom profile fields would not be required.

Thanks to Andreas Diendorfer for providing the patch.
2015-02-06 09:52:37 +08:00
sam marshall
abdbfc76fc MDL-45469 Conditional availability: Restrict by text area broken
It has never worked, because the data for text area fields is not
loaded into the $USER object.

Changing it so that the dropdown list does not include these types
of field.
2014-05-19 11:37:51 +01:00
Sam Hemelryk
a2ed6e69f9 MDL-44255 user: tidied up phpdocs and coding style 2014-02-24 09:23:47 +13:00
Jason Fowler
6e5d002e57 MDL-35875 - User - Modify the profile page to use semantic HTML rather than tables for layout 2013-03-15 17:09:37 +08:00
Damyon Wiese
4e516138e9 Revert "MDL-35875 - Users - Fixing RTL support"
This reverts commit fbb31b0f905c8859cc4f559f4f8148769367ece6.
This reverts commit c111b9f3aeea98542213ff530f59291fd45d1245.
This reverts commit 8afb9b7c4f2bfbb336b3e3af580cb14d32b0e917.

This issue has failed testing and integration will be delayed.
2013-02-28 10:53:03 +08:00
Jason Fowler
8afb9b7c4f MDL-35816 - User - Modify the profile page to use semantic HTML rather than tables for layout 2013-02-22 13:59:49 +08:00
Rajesh Taneja
3ac4ad0050 MDL-37339 Administration: Unique custom profile should not be checked if it's empty.
Currently we have two options for custom profile fields 'Unique' and 'Required'
If value s not entered for unique and not required field then we should allow
duplicate empty values. If value is entered then we should check for unique input.
In case field is unique and required then it should be always checked as required
field can't be empty.
2013-01-16 09:44:32 +08:00
Frederic Massart
4373103084 MDL-34460 Librairies: Replaced deprecated get_context_instance() 2012-07-26 13:23:28 +08:00
Rajesh Taneja
fc3aa0fbaf MDL-32787 user: rule required for custom profile fields applies to all users editing own profile 2012-07-03 13:46:13 +08:00
Petr Skoda
c990e4bfcb MDL-32405 fix PHP4isms and other E_STRICT issues in custom profile fields 2012-04-15 17:15:50 +02:00
Petr Skoda
ffcb837973 MDL-26177 compare 255 chars when checking custom field uniqueness 2011-02-02 09:15:42 +01:00
Petr Skoda
af0a06cb5a MDL-26177 fix non-working unique custom field check 2011-02-01 14:34:31 +01:00
Tim Hunt
25f44c72bd custom profile fields MDL-26177 fields with unique were broken because you cannot use get_field with TEXT columns. 2011-01-29 15:42:09 +00:00
jerome mouneyrac
6d153e67b4 webservice MDL-18655 add new capability moodle/user:viewalldetails allowing to see all user information. This capability is set up copying the current moodle/user:update assignations 2010-11-05 06:55:43 +00:00
Petr Skoda
bf718f50ac MDL-24321 switching to stdClass in /user/ 2010-09-21 08:27:29 +00:00
David Mudrak
dc45a43a87 MDL-21845 multilang filter applied to custom field labels in user profile
Merged from 1.9 and 1.8
2010-07-28 09:42:05 +00:00
Petr Skoda
a1248ca40e MDL-18964 moving the preloaded custom profile fields into $USER->profile array instead of injecting fields directly into $USER; unfortunately this is not consistent with other preloaded data such as preferences, we can not refresh it properly because we can inject the data only once, also we risk future collisions when adding new fields into user table + implemented reloading after the profile changes; change noted in release notes 2010-07-25 21:00:59 +00:00
jerome mouneyrac
fb79269bef webservice MDL-20808 add user lib.php, add web service user functions, rename $usercustomfields variable into profile_user_record() function 2010-02-11 04:02:04 +00:00
Petr Skoda
aa6c1ced0a MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-04 08:11:02 +00:00
Sam Hemelryk
8bdc9cacad files MDL-20601 Conversion of many of the uses of print_textarea, and the mforms htmleditor to the new editor
Please forgive me if I have missed converting any output statements. If you do find an output statement that is not formatting correctly please refere to the table I added to this bug in regards to how it should be formatted.
2009-11-04 06:14:06 +00:00
skodak
bf8e93d704 MDL-18293 $DB->somethiong is using exceptions, no need for ifs tehre, removing useless strings 2009-06-03 20:00:08 +00:00
skodak
6346609584 MDL-18265 fixed regressions by hardfreeze security workaround - defaults were overriding locked values 2009-03-07 20:59:25 +00:00
thepurpleblob
adc82791a0 MDL-17048:
Added additional check for non-visible fields in signup page.

Merged from STABLE_19
2009-01-14 10:07:39 +00:00
thepurpleblob
85576776ae MDL-17048
Corrected misuse of formslib - works now.

Merged from STABLE_19
2009-01-13 13:22:15 +00:00
thepurpleblob
17a99a133e MDL-17048
Suppress display of empty custom profile field categories

Merged from STABLE19
2009-01-07 13:58:41 +00:00
ikawhero
76727901a6 MDL-17228 Allow admins to view hidden custom profile fields.
Thanks to Alan Barrett for the fix. Merged from MOODLE_19_STABLE
2008-12-24 04:17:56 +00:00
skodak
351d5250c0 MDL12333 fixed code to use new DML syntax 2008-12-09 22:15:03 +00:00
stronk7
6a08c83042 MDL-17151 DB 2.0 syntax: fixed wrong usage in previous commit 2008-11-07 12:49:11 +00:00
ikawhero
35a261eb6d MDL-17151: Missing code to check for uniqueness of values.
Merged from MOODLE_19_STABLE
2008-11-07 05:57:24 +00:00
ikawhero
501ca377a1 MDL-17151: Fix typo. Merged from MOODLE_19_STABLE. 2008-11-07 02:01:19 +00:00
skodak
cc44433620 MDL-16839 forms: workaround for problematic hard frozen values; merged from MOODLE_19_STABLE 2008-10-13 19:39:27 +00:00
jerome
416afdbb66 MDL-12333: display custom field in categories box on the signup page 2008-08-18 08:26:41 +00:00
dongsheng
d32482383a "MDL-14129, fix print_error" 2008-06-15 09:48:42 +00:00
dongsheng
161ef22b3f "MDL-14129, fix print_error" 2008-06-15 09:48:42 +00:00
skodak
5849cfe28d MDL-14679 fixed regression 2008-06-01 10:20:23 +00:00
skodak
5d910388bb MDL-14679 towards /user conversion 2008-05-30 22:11:31 +00:00
dongsheng
ef35441d27 MDL-14460, fix get_context_instance, merged from MOODLE_19_STABLE, see tracker. 2008-04-22 06:24:14 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
poltawski
bbebbc0c57 MDL-12446 - profile signup page not respect custom user profile field
sortorder

Merged from MOODLE_19_STABLE
2007-12-05 14:33:10 +00:00
skodak
a78890d593 MDL-12133 validate() method tidying up; merged from MOODLE_19_STABLE 2007-11-23 22:15:07 +00:00
ikawhero
91cddbc454 Only include data from field types that are "small" 2007-10-08 08:10:45 +00:00
ikawhero
66643c0aa8 New function to return a partial user object with the custom profile fields
set.
2007-10-08 07:21:32 +00:00
ikawhero
831d450e3f Adding custom profile fields to the signup page.
The only two authentication plugins this affects are email and ldap.
2007-08-20 08:30:34 +00:00
ikawhero
62ebb00033 Additional settings for the custom profile fields 2007-08-15 13:37:52 +00:00