SiteScripts

SiteScripts - PHP Scripts, CGI Scripts, Free Javascript & ASP Scripts.

CF_Login

CF_Login CF_Login CFC is a group of functions written for ColdFusion MX. By using these functions you can easily add a login framework around any of the pages within your site. I did not include the cflogin and cfloginuser functions built into the MX version. I felt that with all the extra work that is required to use these functions you had already built 99% of the code needed to have an effective login framework. To add this framework to a page you will need to include the template calllogin.cfm. This page will call the functions defined in loginframeworkCFC.cfc. Below is a list of the functions that are available, all of which are built into this process.

forceLoginpage() -
Does what is says, calls the login page (login.cfm) set up for a site.

forceLogin() -
When the login form has been submitted this function will take the username and password passed and check to see if that combination exists within the database. If the username and password exists they are passed back to the page that had the security function included.

forceLogout() -
This function is added to the logoff.cfm page. It is suggested that you add some logic to pass the users to another page once they have logged off. This will allow you to

securitycheckUser() -
When called this function requires requiredrole and cookierole. The function will compare these two values and if the cookierole is less than or equal to the requiredrole the user will be allowed to continue. If this is not the case they will be sent to the roledenied.cfm. The roledenied.cfm page can be replaced with your own code.

getCurrentusers() -
When called this will return a number that represents all users that are currently logged in. This function looks to see how many people have been logged in over the last 15 minutes. If you want to vary this number you can change it in the expirationdatetime definition

updateLogindatetime() -
When called this function will update the time in the lastupdatetime in your login table.
  • Price: $45
  • Updated: 10/02/04
  • Visits: 56
  • Rating: Unrated.
Get Rated Modify

Reviews for CF_Login


Write a Review