- Klick auf
Neue JiffyBox erstellen
- Distribution ist egal (wird später überschrieben)
- Kennwort ist auch egal (wird ja auch überschrieben)
- Warten bis die JiffyBox erstellt ist
- JiffyBox stoppen
This gist contains a simple plugin that automatically logs in a user into Wordpress with the login name provided by HTTP basic authentication. If no HTTP authentication is present, the plugin exits the rendering process; if a user is logged in who does not have a Wordpress account, the plugin also exits.
This plugin is intended for internal blogs, for example for a team, which are anyway protected by HTTP basic authentication and where you want a single-sign-on solution.
Simply paste the PHP file into the wp-content/plugins
folder and then enable the plugin in admin panel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($_SESSION['user'])) { | |
require_once( COMPONENTS . "/user/class.user.php" ); | |
$_SESSION['user'] = $_SERVER['PHP_AUTH_USER']; | |
$_SESSION['lang'] = 'en'; | |
$_SESSION['theme'] = 'default'; | |
$_SESSION['project'] = '/var/www'; | |
$User = new User(); |