Jump to content

onklmaps

Member
  • Posts

    10
  • Joined

  • Last visited

About onklmaps

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

onklmaps's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Nothing? I actually made a script myself using the normal cPanel api that i run from a hook in WHMCS. But I would'nt say this is "solved" because, I would prefer to run the cPanel UAPI call via the ModuleCustom in WHMCS. 1. What whm/cpanel api does WHMCS use (WHM 0, WHM 1, cPanel UAPI)? (I fear its only connecting to WHM and not cPanel). 2. Can ANY whm/cpanel api call be used or are some hard coded in the WHMCS-cPanel module? Anyone knows?
  2. I want to be able to create MySQL databases from WHMCS. So I have setup a working connection to WHMCS API. I know it works, since I create accounts and all. So... I try to use the "ModuleCustom" to run some WHM/cPanel api functions: create database create db user assign db user to database. Finding the right commands in the whm documentation isn't hard, but trying to figure out how to run them from the whmcs api, is.. Is it even possible to run whm api functions through the whmcs api? What whm API is used? API 0, API 1 or UAPI? Can I use ANY whm api functions? What ever I try I get this response: !Function not found in module!
  3. Thanks again Brian # 2 is solved like you said! I'm starting to understand how configurable WHMCS is. Now trying to fix #1
  4. We are a SAAS-provider, and will under no circumstances give our customers access to cPanel, ftp or database. However, we love the automation in WHMCS, the way it sets up a cPanel-account, domain, installs our software, and e-mail. I have successfully removed the "login to cPanel"-links, and also the "Change password"-link. (by adding a hook to remove sidebar-links). I removed unwanted c-panel icons from the client area. (By editing theme file). I disabled welcome-mail - to prevent the cPanel password to be sent to the customer. I intentionally kept the "Quick-add e-mailaccount"-form and the link to webmail. That's really all the client needs to see.. HOWEVER, and these are important problems!: If some of our more experienced users would write &dosinglesignon=1 while at Product Details-page, then they are magically redirected to cPanel. If the same user writes #tabChangepw, he can easily change his cPanel-password so he can login. I tried deleting the cPanel-password from the client details in WHMCS-admin. Still the user can both login and change password. THE ONLY way I found that disables those features, is to remove also the cPanel username from the client/product-detalis in whmcs-admin, but offcourse, that also disables the ability to create e-mailaccounts, it prevents whmcs automation to suspend accounts when payment is not received etc. Well... The options I have found so far aren't really secure at all So... What to do?
  5. Thanks alot Brian That array list from v6 was a gem! Why did they leave that out in v7 documentation? Well, i tried the following command now.. But it didnt work either.. add_hook('PreModuleChangePassword', 1, function($vars) { $return = array(); $return[] = array("abortcmd"=>true); return $return; }); Please be hazardous and give another suggestion Brian
  6. I need to do both. I did change the tpl files, but still if some skilled user enters /page=changepassword&id=232 - or something like that, he will still access the page. That's why the abortcmd => exists.
  7. Because we not a normal web-host. We are more like a SAAS, and we will not offer login to cPanel at all. For our part WHMCS is used for deploying a website + billing and support. Has someone used this command before?
  8. Hi, I want to disallow my clients from changing the cPanel password, so I added the following hook function: add_hook('PreModuleChangePassword', 1, function($vars) { return array( /* 'serviceid' => $vars['params']['serviceid'], ---> Not sure if this is needed? */ 'abortcmd' => true, ); }); Can anyone help me see why it's still possible for the clients to change password? Thanks!
  9. Hi, After much trial and error I'm asking here, and hopefully getting some insight from one of you experts I want to change the whm package directly after a client has ordered a cpanel hosting account from whmcs. The reason I want to do this, is that my Installatron auto-installer hook script needs to call the Installatron API from the cPanel-account. As soon as the initial call is done, root takes over and finishes the task, and the cPanel-account no longer needs the Installatron feature activated. So therefore, at AfterModuleCreate-hook i run the installatron script with priority 1 first, and then my downgrade script with priority 2. Both scripts run fine, but my downgrade script fails to do what is intended. It does not change to the downgraded whm-package, but keeps the full featured one. Please see the code: <?php function downPackage($vars) { $command = 'ModuleChangePackage'; $postData = array( 'accountid' => $vars['params']['accountid'], 'user' => $vars['params']['username'], 'pkg' => 'name_of_the_downgraded_whm_package', // New whm-package I want to change too. ); $adminUsername = 'admin'; $results = localAPI($command, $postData, $adminUsername); } add_hook("AfterModuleCreate",2,"downPackage"); ?> Please see the System Module Debug Log > Request: Request has the wrong pkg name! Why is that, and how can I correct it?
  10. Hi, I want to change the whm package directly after module is created. The reason I want this, is that my Installatron script needs to run with with full privileges first, but I want to downgrade the cpanel privileges after the installatron script has started. So therefore i run the installatron function at hook afterModuleCreate with priority 1 first, and then my other script with priority 2. Installatron runs great, and my other script runs to, but fails to do what is intended: to change WHM package from "full-featured-whm-package" to "limited-whm-package". Just to clarify: package = plan. Please see the code: <?php function downPackage($vars) { $command = 'ModuleChangePackage'; $postData = array( 'accountid' => $vars['params']['accountid'], 'user' => $vars['params']['username'], 'pkg' => 'limited-whm-package', // New whm-package I want to change too. ); $adminUsername = 'admin'; $results = localAPI($command, $postData, $adminUsername); } add_hook("AfterModuleCreate",2,"downPackage"); ?> Looking inside #whmcs admin panel > System Module Debug Log > Request", i see that the request contains the old package name?! Why is that, and how can I correct it? user=my_cpanel_user&pkg=full-featured-whm-package Thank you
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated