def create_user_db(auth_id, name, username, email='', verified=False, password='', **props):
"""Saves new user into datastore"""
if password:
password = util.password_hash(password)
email = email.lower()
user_db = model.User(
name=name,
email=email,
username=username,
auth_ids=[auth_id] if auth_id else [],
verified=verified,
token=util.uuid(),
password_hash=password,
**props
)
user_db.put()
task.new_user_notification(user_db)
return user_db
评论列表
文章目录