Tcalp Posted May 12, 2013 Share Posted May 12, 2013 I am attempting to do a quick check to see if a user account exists (domain hosting/cPanel) to create an additional DNS zone record. I'm using the following code but the recordset is returning empty. //CHECK IF MAIN DOMAIN IS HOSTED, IF SO CREATE THE DNS RECORD ON THE APPROPRIATE CLUSTER $domain = str_replace('http://', '', $params['customfields']['Source URL']); $domain = str_replace('https://', '', $domain); $domain = trim(str_replace('www.', '', $domain)); $fields = "tblservers.username, tblservers.password, tblservers.hostname"; $where = array( 'userid' => $params['clientsdetails']['userid'], 'domain' => $domain, ); $sort = "id"; $sortorder = "ASC"; $limits = "0,5"; $join = "tblservers ON tblservers.id=tblhosting.server"; $result = select_query('tblhosting',$fields,$where,$sort,$sortorder,$limits,$join); while ($data = mysql_fetch_array($result)) { $cpuser = $data['username']; $cppass = $data['password']; $cphost = $data['hostname']; } $results = localAPI('decryptpassword',array('password2' => $cppass),'admin'); $cppass = $results['password']; 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.