Last active
August 29, 2015 13:56
-
-
Save ddspringle/9335942 to your computer and use it in GitHub Desktop.
Setting up an admin account for cfSpeakerList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- create a user object, modify 'myemail' and 'mypassword' ---> | |
<cfset userObj = CreateObject('component','core.beans.User').init( | |
userId = 0, | |
username = 'myemail', | |
password = LCase(Hash('mypassword','SHA-384')), | |
role = 'admin', | |
isActive = 1 | |
) /> | |
<!--- save the user object ---> | |
<cfset userObj.setUserId(APPLICATION.userDAO.saveUser(userObj)) /> | |
<!--- generate a speaker object ---> | |
<cfset speakerObj = CreateObject('component','core.beans.Speaker').init( | |
speakerId = 0, | |
speakerKey = RandRange(100000,999999), | |
userId = userObj.getUserId(), | |
firstName = 'Admin', | |
lastName = 'User', | |
email = userObj.getUsername(), | |
showPhone = 0, | |
showTwitter = 0, | |
isOnline = 0, | |
isACP = 0, | |
isAEL = 0, | |
isAET = 0, | |
isACL = 0, | |
isUGM = 0, | |
isOther = 0 | |
) /> | |
<!--- save the speaker object ---> | |
<cfset speakerObj.setSpeakerId(APPLICATION.speakerDAO.saveSpeaker(speakerObj)) /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Missing
isAEL = 0,
isACL = 0,