LFA Posted February 13, 2008 Share Posted February 13, 2008 Extract the attached file to your TCAdmin Web folder and redirect the user to this page from your website with these parameters: http://xxx.xxx.xxx.xxx/md5login.aspx?[b]userid[/b]=TCADMIN_USER_ID&[b]md5pass[/b]=MD5_PASSWORD&[b]remember[/b]=0 Parameters userid: The tcadmin user id md5pass: The MD5 hash for the user's password. You can get this value from the tcadmin database in TC_USERS.MD5_PASSWORD remember: This value is optional. Set the value to 1 to use the "remember me" login option.md5login.zip Link to comment Share on other sites More sharing options...
Defcon|Rich Posted February 13, 2008 Share Posted February 13, 2008 Luis, Can you give an example of how this would be used? Link to comment Share on other sites More sharing options...
LFA Posted February 13, 2008 Author Share Posted February 13, 2008 If you have give your customers a login to your website they can log in to TCAdmin automatically. For example: - The user logs in to your website - They click on the tcadmin control panel link - The coding in this page takes the user's email and looks for the user id and md5 password in the tcadmin database. SELECT USER_ID, MD5_PASSWORD FROM TC_USERS WHERE EMAIL1='customer@yahoo.com' - With this information you can redirect them to the md5login page for the automatic login. Link to comment Share on other sites More sharing options...
Stealth Posted August 17, 2008 Share Posted August 17, 2008 im having trouble with this script ... no matter what username i use and they definately exist SDK.Errors.txt logs: "17/08/2008 16:06:26 : Objects.User.Find: Object reference not set to an instance of an object." Link to comment Share on other sites More sharing options...
BLAST3R Posted September 2, 2008 Share Posted September 2, 2008 Hello LFA, How can I integrate this into my website with Curl? It seems to not accept the sessions properly. Link to comment Share on other sites More sharing options...
ECF Posted September 2, 2008 Share Posted September 2, 2008 You may want to put in a support ticket. Luis does not browse these forums all that much. Link to comment Share on other sites More sharing options...
BLAST3R Posted September 2, 2008 Share Posted September 2, 2008 Yeah I noticed ECF . I have just choosen the 'easy' way for now. Integrate the design as template into the panel. (the way around) I quite like our current set up. One 'basic' interface on our own control panel at the website (basic start/stop/restart, overview, filemanager using Curl and the SDK) and one 'expert' interface just using the login method of LFA auto logging in fetching the userid and md5pass from the tcadmin DB assigned to that customer and being the panel itself. I love TCAdmin. Link to comment Share on other sites More sharing options...
LFA Posted September 3, 2008 Author Share Posted September 3, 2008 Hello LFA, How can I integrate this into my website with Curl? It seems to not accept the sessions properly. If you create a TCAdmin session and logout in every custom script you should not have any problems with curl sessions. Link to comment Share on other sites More sharing options...
Admin-Nation-Servers Posted March 15, 2009 Share Posted March 15, 2009 here if you guys want it to redirect back to a page with a result, instead of leaving a white page here is the code. <% Dim userid As String = Request.QueryString("userid") Dim md5pass As String = Request.QueryString("md5pass") Dim remember As Boolean = False Dim user As New TCAdminSDK.Objects.User If Not Request.QueryString("remember") Is Nothing Then remember = Request.QueryString("remember").Equals("1") End If user.UserID = userid If user.Find Then If user.MD5Password.Equals(md5pass) Then Dim sesssion As New TCAdminSDK.Web.Session Dim userpass As String = TCAdminBase.Encryption.DecryptString128Bit(user.Password) If sesssion.LogOn(user.UserID, userpass) Then If remember Then Dim uCookie As HttpCookie = New HttpCookie("TCAdminUserID", user.UserID) Dim pCookie As HttpCookie = New HttpCookie("TCAdminUserPassword", TCAdminBase.Encryption.EncryptString128Bit(userpass, System.Web.HttpContext.Current.Request.UserHostAddress())) uCookie.Expires = Now.AddDays(15) pCookie.Expires = Now.AddDays(15) Response.Cookies.Add(uCookie) Response.Cookies.Add(pCookie) End If Response.Redirect("~/Templates/Default/user_home.aspx") Else Response.Write("Could not create session.") End If Else Response.Redirect("http://yourdomain/index.php?error=1") End If %> here is an example of its use, https: //www.an-servers.com/index.php as a non error, and here is with error, http://www.an-servers.com/index.php?error=1 of course you need a script to look at the result error=1 anyway, i am making a script to multi login for whmcs, tcadmin, and another control panel Link to comment Share on other sites More sharing options...
integrapynoy Posted June 15, 2011 Share Posted June 15, 2011 Extract the attached file to your TCAdmin Web folder and redirect the user to this page from your website with these parameters: http://xxx.xxx.xxx.xxx/md5login.aspx?[b]userid[/b]=TCADMIN_USER_ID&[b]md5pass[/b]=MD5_PASSWORD&[b]remember[/b]=0 Parameters userid: The tcadmin user id md5pass: The MD5 hash for the user's password. You can get this value from the tcadmin database in TC_USERS.MD5_PASSWORD remember: This value is optional. Set the value to 1 to use the "remember me" login option. I tried this but i keep getting a incorrect password. I have followed this step by step. What am i doing wrong? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.