开发者 |
davidoc
fkooman usrlocaldick |
---|---|
更新时间 | 2016年11月5日 22:50 |
PHP版本: | 3.0.0 及以上 |
WordPress版本: | 3.5.1 |
simplesaml-authentication.php
to the wp-content/plugins/
directory of your WordPress installation.sanatize_user()
function will be called on the value of this attribute (see wp_includes/formatting.php
) which will remove anything but lowercase alphanumeric, space, dot, dash, and @-sign, and truncate it to 60 characters. A check is done to prevent creation of accounts with wrong usernames.
If the attribute you intend to use as username does have illegal characters, or is longer, you can work around this by using a hash of the username. Configure an extra attribute in simpleSAMLphp, for instance by applying an authproc filter like this:wp_userid
as the username attribute. Now STAY LOGGED IN to your original administrator account. You won't be able to log back in once you log out.
4. Open a different browser, or on another computer. Log in to your blog to make sure that it works.
5. In the first browser window, make the newly created user an Administrator. You can log out now. (Alternately, you can change some entries in the wp_usermeta table to make a new user the admin)
6. Disable Options -> General -> Anyone can register (they won't be able to)
7. Make sure you enable administration over SSL (see http://codex.wordpress.org/Administration_Over_SSL)Starting from version 0.3.0 the plugin requires simpleSAMLphp 1.5 or higher. Use version 0.2.x of this plugin for simpleSAMLphp < 1.5 support.