Skip to content

Instantly share code, notes, and snippets.

@aceat64
Last active December 11, 2015 23:29
Show Gist options
  • Save aceat64/4677089 to your computer and use it in GitHub Desktop.
Save aceat64/4677089 to your computer and use it in GitHub Desktop.
snippet from phpBB's auth_ldap.php file
<?php
// generate user account data
$ldap_user_row = array(
'username' => $username,
'user_password' => phpbb_hash($password),
'user_email' => (!empty($config['ldap_email'])) ? utf8_htmlspecialchars($ldap_result[0][htmlspecialchars_decode($config['ldap_email'])][0]) : '',
'group_id' => (int) $row['group_id'],
'user_type' => USER_NORMAL,
'user_ip' => $user->ip,
'user_new' => ($config['new_member_post_limit']) ? 1 : 0,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment