Jump to content

zooky

Member
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

0 Neutral

About zooky

  • Rank
    Member
  1. Hey All, I have a custom LDAP hook for WHMCS which creates a user on a LDAP server when a new customer signs up. After upgrading to WHMCS v8, it seems the hook "create" function is not working. Below is a bit from Module Debug Log Action = hook_ldapsync_createuser Request: Array ( [client_id] => 5114 [user_id] => 5144 [userid] => 5114 [firstname] => Test [lastname] => Testing [companyname] => [email] => testing@test.net.net [address1] => 22 Test St [address2] => [city] => Testing [state] => New South Wales [postcode] => 2000 [country] => AU [phonenumber] => +1.324234234234 [password] => [tax_id] => [customfields] => Array ( [3] => testy ) ) Response Array ( [0] => Example Server [1] => Failed while creating an object. Server is unwilling to perform Array ( [0] => Example Server [1] => Failed while creating an object. Server is unwilling to perform [2] => Array ( [0] => Array ( [file] => /XXXX/public_html/members/includes/hooks/ldapsync.php [line] => 53 [function] => create Below are lines 18 - 62 from ldapsnc.php hook file /** * Hook - create user * * @param array $vars */ function hook_ldapsync_createUser($vars) { hook_ldapsync_loadClasses(); $configs = MgLDAPSyncConfig::$config; $trialProducts = $configs['Example Server']; $isTrialAccount = false; $products = \WHMCS\Session::get("cart"); if(is_array($products['products'])) { foreach ($products['products'] as $key => $product) { if(in_array($product['pid'], $trialProducts['idsOfTrialProducts'])) { $isTrialAccount = true; break; } } } foreach ($configs as $name => $params) { try { $manager = new MgLDAPSyncManager($params['server']['hostname'], $params['server']['port'], $params['server']['username'], $params['server']['password']); $object = new MgLDAPSyncObject('create', $params, $vars, $isTrialAccount); if(!isset($vars['notes']) || $vars['notes'] == '') { unset($object->attributes['description']); } $manager->create($object); logModuleCall('LDAP Sync', __FUNCTION__, $vars, array($name, $manager, $object, $products, $isTrialAccount, $result), '', array($params['server']['password'])); } catch (\Exception $e) { logModuleCall('LDAP Sync', __FUNCTION__, $vars, array($name, $e->getMessage(), $e->getTrace()), '', array($params['server']['password'])); } } } Hopefully enough info to go off by Thank you
  2. Works beautifully @brian! thank you!! ๐Ÿ˜€๐Ÿ˜„
  3. I have come across the below from a 2010 post. {if $filename eq "cart" && $smarty.get.a eq "view"} <meta HTTP-EQUIV="REFRESH" content="0; url=http://yourwebsite.com/cart.php?a=checkout"> {/if} Would a mod_rewrite rule work better than the above?
  4. Hi All, Is it somehow possible to skip the "view cart" page for a new customer and take them directly to the "check out" page?
  5. Thatโ€™ll do me just fine, thank you very much! ๐Ÿ˜
  6. Hi @Jafar Muhammed thanks for the reply. I have removed some text fields like "address 2" "company" etc, so I would now rather the rest all be in a list style to make it look neater
  7. Hello, I would like to center and list style all the checkout text fields. What would be the best way to achieve this? Currently its set out to be firstname last name email phone I would like it to look like firstname lastname email phone Thank you
  8. Greetings! Is it somehow possible to disable/hide/mask the IP address from the "Manage Orders" screen? Thanks
  9. Hi, How would i go about re-arranging/tidying up the knowledge base categories? Ive currently got 9 main headings and it looks quite messy/out of place. I'd be happy with just a single column list instead of 3 columns Thanks
  10. Thanks guys, really appreciate your help! All working
  11. Worked, thank you sir! I cannot find this file anywhere. Where exactly do am i looking? Worked!
  12. Hi All, I would like to try and mask/hide my clients IP addresses from Other Information, Recently Activity and Support tickets. Is something like this possible?
×
×
  • 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