Created
January 16, 2016 06:16
-
-
Save pawl/ec77bd87b862e9b5896e to your computer and use it in GitHub Desktop.
Example of a WHMCS hook code using WHMCS's new "The Connection Manager"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
function create_ldap_account($vars) { | |
$userid = $vars['userid']; | |
$criteria = array('fieldid' => '2', 'relid' => $userid); | |
$result = Capsule::table('tblcustomfieldsvalues')->where($criteria)->first(); | |
$username = $result->value; | |
} | |
add_hook("ClientAdd",1,"create_ldap_account"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment