Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- External html login:
- <form name='form' action="https://domain.com/index.php" method="post">
- <p><label for="_user">Email</label><input name="_user" id="_user" value="" type="text" /></p>
- <p><label for="_pass">Password</label><input name="_pass" id="_pass" value="" type="password" /></p>
- <p>
- <input type="hidden" name="autodetect" value="0" />
- <input type="hidden" name="logged" value="1" />
- <input type="hidden" name="_action" value="login" />
- <input type="hidden" name="_task" value="login">
- <input type="hidden" name="_timezone" value="_default_">
- <input type="hidden" name="_url" value="">
- <input class="button" name="submit" id="submit" value="Log on" type="submit" />
- </p>
- </form>
- In config/main.inc.php:
- $rcmail_config['plugins'] = array('password', 'http_authentication');
- In plugins/http_authentication/http_authentication.php:
- function authenticate($args)
- {
- // Allow entering other user data in login form,
- // e.g. after log out (#1487953)
- if (!empty($args['user'])) {
- return $args;
- }
- if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
- $args['user'] = $_SERVER['PHP_AUTH_USER'];
- $args['pass'] = $_SERVER['PHP_AUTH_PW'];
- }
- $args['cookiecheck'] = false;
- $args['valid'] = true;
- return $args;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement