Skip to content

Instantly share code, notes, and snippets.

@krschmidt
Created October 10, 2015 18:08
Show Gist options
  • Save krschmidt/c09756eed306cb4f170a to your computer and use it in GitHub Desktop.
Save krschmidt/c09756eed306cb4f170a to your computer and use it in GitHub Desktop.
LDAP to CAS Converstion
INSERT INTO cas_user (uid, cas_name)
SELECT u.uid AS uid, u.name as cas_name
FROM users u
WHERE uid <> 0 AND
NOT EXISTS (SELECT cas_name FROM cas_user c WHERE c.cas_name = u.name) AND
u.name NOT LIKE "L0%";
@krschmidt
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment