moodlehq / moodle-auth_pop3 Goto Github PK
View Code? Open in Web Editor NEWPop3 authentication plugin removed from standard distibution in Moodle 3.4
Pop3 authentication plugin removed from standard distibution in Moodle 3.4
Hi
Here is my little addon I did on my moodle site, should be self-explainable.
Index: auth.php =================================================================== --- auth.php (wersja 4) +++ auth.php (kopia robocza) @@ -137,6 +137,17 @@ } } + /** + * {@inheritdoc} + * + * @param string $username username + * @return mixed array with no magic quotes or false on error + */ + function get_userinfo($username) { + return !empty($this->config->mapusernametoemail) + ? array('email' => $username) + : array(); + } } Index: lang/en/auth_pop3.php =================================================================== --- lang/en/auth_pop3.php (wersja 4) +++ lang/en/auth_pop3.php (kopia robocza) @@ -34,3 +34,5 @@ $string['auth_pop3type'] = 'Server type. If your server uses certificate security, choose pop3cert.'; $string['auth_pop3type_key'] = 'Type'; $string['pluginname'] = 'POP3 server'; +$string['auth_pop3mapusernametoemail'] = 'Map pop3 username to local email'; +$string['auth_pop3mapusernametoemailhelp'] = 'If an email address is used as remote pop3 username to authenticate you can map it to local email (for example to be able to lock email field).'; Index: settings.php =================================================================== --- settings.php (wersja 4) +++ settings.php (kopia robocza) @@ -58,6 +58,11 @@ get_string('auth_pop3changepasswordurl_key', 'auth_pop3'), get_string('changepasswordhelp', 'auth'), '', PARAM_URL)); + // Map pop3 username to email + $settings->add(new admin_setting_configcheckbox('auth_pop3/mapusernametoemail', + get_string('auth_pop3mapusernametoemail', 'auth_pop3'), + get_string('auth_pop3mapusernametoemailhelp', 'auth_pop3'), '')); + // Display locking / mapping of profile fields. $authplugin = get_auth_plugin('pop3'); display_auth_lock_options($settings, $authplugin->authtype, $authplugin->userfields,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.