Skip to content

Instantly share code, notes, and snippets.

@allenluce-zz
Created September 26, 2012 18:12
Show Gist options
  • Save allenluce-zz/3789608 to your computer and use it in GitHub Desktop.
Save allenluce-zz/3789608 to your computer and use it in GitHub Desktop.
from repoze.lemonade.content import create_content
from opencore.models.interfaces import IProfile
from opencore.security.policy import to_profile_active
groups = ('group.KarlStaff',)
lastname = "Reynolds"
email = "nobody@nowhere.com"
users = root.users
profiles = root['profiles']
for i in range(100):
login = "runbob%d" % (i + 2)
firstname = "No Bob Number%d" % i
users.add(login, login, login, groups)
profile = profiles[login] = create_content(IProfile,
firstname=firstname,
lastname=lastname,
email=email,
)
to_profile_active(profile)
import transaction
transaction.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment