45 Commits

Author SHA1 Message Date
Stephen Bourget
037273d87e MDL-12689: convert auth plugins to use settings.php 2017-04-03 10:50:09 -04: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
Dan Poltawski
2ac792f579 Merge branch 'MDL-41598-master' of https://github.com/mackensen/moodle 2015-07-27 15:24:31 +01:00
Mark Nelson
91ad3ef1a2 MDL-46016 auth_shibboleth: updated misleading comment
Also generated a random string for the password field in case it is ever used.
2014-07-03 16:15:44 -07:00
Matt Petro
5f1b2e8821 MDL-45118 shibboleth: set context on index page 2014-04-15 23:11:32 -04:00
Charles Fulton
f09afcdd28 MDL-41598 auth_shibboleth: don't override wantsurl 2014-02-14 10:51:17 -08:00
Mark Nelson
5991cabfd7 MDL-40045 auth: removed unnecessary add_to_log calls
Both LDAP and Shibboleth call complete_user_login which triggers
a user_loggedin event that handles the legacy call to add_to_log.
2013-10-21 11:53:30 +08:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Charles Fulton
ab0ccc6731 MDL-37020 auth_shibboleth: check if target variable is actually set 2012-12-05 11:18:37 -08:00
Sam Hemelryk
2ede3d7f35 Merge branch 'MDL-31629-master' of git://github.com/micaherne/moodle 2012-11-06 10:08:43 +13:00
David Tang
54d6517db3 MDL-31629 auth_shibboleth Use correct language string location 2012-10-17 12:56:14 +01:00
Michael Aherne
af402e5677 MDL-36101 auth_shibboleth Show appropriate error message for suspended accounts 2012-10-17 12:37:43 +01:00
Charles Fulton
39323c753d MDL-35153 shibboleth: check for WAYFless URLs 2012-09-13 19:13:58 -07:00
Ankit Agarwal
bf0f06b1be MDL-34471 libraries: Replace all uses of get_context_instance() with respective context_XXXX::instance() method 2012-08-02 15:37:38 +08:00
Michael Aherne
7dfe4b92d0 MDL-33331 Strict warning in Shibboleth auth 2012-05-24 13:04:21 +01:00
Petr Skoda
e922fe23b6 MDL-29602 accesslib improvements
Refactoring and improvements of the accesslib.php library including prevention of access for not-logged-in users when forcelogin enabled, improved context caching, OOP refactoring of contexts, fixed context loading, deduplication of role definitions in user sessions, installation improvements, decoupling of enrolment checking from capability loading, added detection of deleted and non-existent users in has_capability(), new function accesslib test, auth and enrol upgrade notes.

More details are available in tracker subtasks.
2011-10-16 14:05:18 +02:00
Petr Skoda
0342fc3609 MDL-28158 add optional "Remember username" checkbox in login forms 2011-07-10 13:22:55 +02:00
Petr Skoda
8a8f1c7cd6 MDL-10137 rewritten cookie test on login page, username cookie is not required any more - hopefully this will be more reliable test 2010-10-10 17:30:28 +00:00
Petr Skoda
629e12fd81 MDL-23927 do not use = 'guest' because we have CFG->siteguest AND it matches any other username with accents and different case in MySQL 2010-08-25 08:43:42 +00:00
Petr Skoda
df997f841f MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
    MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
    MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
    MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
    MOV [enrolenddate,core],[enrolenddate,enrol_self]
    CPY [welcometocourse,core],[welcometocourse,enrol_self]
    CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
    MOV [notenrollable,core],[notenrollable,core_enrol]
    MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
    MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
    MOV [coursemanager,core_admin],[coursecontact,core_admin]
    MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
    MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
    MOV [enrolme,core],[enrolme,core_enrol]
    MOV [unenrol,core],[unenrol,core_enrol]
    MOV [unenrolme,core],[unenrolme,core_enrol]
    MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
    MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
    MOV [enrolments,core],[enrolments,core_enrol]
    MOV [enrolperiod,core],[enrolperiod,core_enrol]
    MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
Sam Hemelryk
ba2789c101 navigation MDL-22425 Fixed courses not being shown to logged in users and removed all traces of mymoodleredirect settings 2010-05-14 06:41:44 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Petr Skoda
5117d59899 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:55:14 +00:00
samhemelryk
79151615c5 auth MDL-19788 Added PAGE->set_url calls and removed $Id tags 2009-10-15 02:34:31 +00:00
exe-cutor
82909a9ae7 shibboleth authentication: MDL-18597 Merged over changes to HEAD 2009-10-09 11:10:58 +00:00
samhemelryk
80d13119ba auth MDL-19788 Upgrade deprecated function calls 2009-09-30 06:38:52 +00:00
exe-cutor
2f5237edea Merged various fixes from 19 stable 2008-12-08 10:49:44 +00:00
Francois Marier
6800d78e06 Drift between CVS and git
- large deletions
- lucene updates
- error() => print_error()
- NO_MOODLE_COOKIES define
- various other things
2008-06-25 17:31:23 +00:00
dongsheng
957f6fc9d2 "MDL-14460, fix all the other get_context_instance, merged from MOODLE_19_STABLE" 2008-05-02 04:37:02 +00:00
martinlanghoff
cfab8f3946 MDL-9399 - auth/shibboleth: ensure we load enrolments
Most of this code should be replaced with complete_user_login() but it
does a few odd things, so we'll play it safe for now, specially since
I don't have a Shib setup to test...
2007-11-14 22:06:17 +00:00
exe-cutor
f309632a05 Merged changes from stable version 2007-07-11 08:04:12 +00:00
poltawski
a044c05ddb MDL-9742 - changed tabs to spaces in a few places where there are one
or two
2007-05-08 15:07:25 +00:00
exe-cutor
a155f3784d Merged username login form bug fix from stable 2007-04-02 14:13:59 +00:00
exe-cutor
3ea28768af Merging authentication changes back to head 2007-03-09 13:20:55 +00:00
skodak
139ebfdb3b MDL-8590 auth cleanup - part 1 2007-02-20 17:03:36 +00:00
martinlanghoff
b9ddb2d5ea multiauth: migrated all files to the new OO API, written new API documentation
Author: Martin Langhoff <martin@catalyst.net.nz>
2007-01-04 04:52:42 +00:00
exe-cutor
574551d9c8 Merged user capabilities fix for 1.7 2006-11-13 11:54:07 +00:00
skodak
14dfa05958 merged whitespace fix from MOODLE_16_STABLE 2006-06-02 16:42:40 +00:00
exe-cutor
a70d959a71 this file now does the authentication and doesnt use Shibboleth lazy sessions anymore for
various reasons, including security
2006-02-16 08:59:59 +00:00
exe-cutor
49465c358a *** empty log message *** 2005-10-31 15:51:17 +00:00
exe-cutor
a50d860ef1 Fixed a small bug that prevented guest users from log in
See: http://moodle.org/bugs/bug.php?op=show&bugid=3989
Thx to pasi.hakkinen@tut.fi
2005-08-29 15:42:26 +00:00
exe-cutor
c75a9a5c8d Merging fixes from MOODLE_15 2005-06-13 07:54:44 +00:00
exe-cutor
1b5ad83d2e - Added support for Shibboleth data conversion API
- Shib auth now checks for the four essential variables
2005-05-13 15:10:40 +00:00
exe-cutor
bab8ceb10e Extended and corrected the error messages 2005-05-06 06:35:24 +00:00
moodler
565809c603 Moved login.php to index.php in shibboleth 2005-04-17 13:06:25 +00:00