Skip to content

Instantly share code, notes, and snippets.

View thejeffreystone's full-sized avatar

Jeffrey Stone thejeffreystone

View GitHub Profile
@thejeffreystone
thejeffreystone / install.sh
Last active August 29, 2015 14:06
Vagrant Bootstrap file
echo "-- Installing Now -- "
echo "-- Updating Packages... --"
sudo apt-get update
echo "-- Configuring MySQL --"
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
echo "-- Installing Base Packages... --"
@thejeffreystone
thejeffreystone / PHP LDAP Function to verify user credentials
Last active February 10, 2021 14:39
PHP LDAP Function to verify user credentials
public function verifyLdapUser($username,$password)
{
$DomainName=LDAPDOMAIN; // name = domain
$ldap_server=LDAP; // server = ldap://doman.co
// returns true when user/pass binds to LDAP/AD.
$auth_user=$username."@".$DomainName;
//Check to see if LDAP module is loaded.
if (extension_loaded('ldap')) {