Módosítások

DrupalShibbolethReadmeDev

1 558 bájt hozzáadva, 2011. május 23., 16:34
Pre-creating users
# Enable Shibboleth protection
# Login with your own credentials, you should have 'Administrator' rights now.
==== Pre-creating users ====
Versions before 4.0 allowed pre-creating users without any tweaks; if the username matched, the user was logged in.
 
Since 4.0 the module only logs in users who exist in <code>{shib_authmap}</code> and the update script only takes care of users tagged with 'shib_auth' in <code>{authmap}</code>. When there is no mapping in the <code>{shib_authmap}</code>, a new user is attempted to be created, which fails because of the mail being duplicated. So what was accidentally working with pre-created users, do not work anymore with 4.0.
 
To pre-create users, you should first create the Drupal users in your preferred way (either by using the administration interface or by direct SQL query), and then you '''MUST''' manually run the following '''three queries''':
 
<source lang="SQL">
INSERT INTO shib_authmap (uid, targeted_id)
SELECT uid, name
FROM users
WHERE uid > 1 AND (uid) NOT IN
(SELECT uid
FROM shib_authmap);
 
INSERT INTO authmap (uid, authname)
SELECT uid, targeted_id
FROM shib_authmap
WHERE (uid) NOT IN
(SELECT uid
FROM authmap);
 
UPDATE authmap SET module = 'shib_auth'
WHERE (uid) IN
(SELECT uid
FROM shib_authmap);
</source>
 
 
{{NOTE_EN|These queries add all your existing users to <code>shib_authmap</code> with their usernames and make sure that your <code>authmap</code> table contains all of the user entries. You should optimize these queries if you have a large number of users.}}
 
{{ATTENTION_EN|You should repeat these queries each time after you add pre-created users.}}
=== Role assignment ===

Navigációs menü