A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

get user info from AD - Stikked
From moenk, 9 Years ago, written in Visual Basic.
Embed
  1. Option Compare Database
  2.  
  3. Option Explicit
  4.  
  5. Public Function GetPhoneFromLDAP(Username As String) As String
  6.     Dim objConnection As Object
  7.     Set objConnection = CreateObject("ADODB.Connection")
  8.     objConnection.Open "Provider=ADsDSOObject;"
  9.     Dim objCommand As Object
  10.     Set objCommand = CreateObject("ADODB.Command")
  11.     objCommand.ActiveConnection = objConnection
  12.     objCommand.CommandText = "<LDAP://OU=Users,OU=495,OU=ESTR,DC=emea,DC=corpdir,DC=net>;(&( objectclass=user)(sAMAccountName=" & Username & "));telephoneNumber;subtree"
  13.     Dim objRecordSet As Object
  14.     Set objRecordSet = objCommand.Execute
  15.     On Error Resume Next
  16.     GetPhoneFromLDAP = objRecordSet.Fields("telephoneNumber")
  17. End Function
  18.  
  19. Public Function GetMailFromLDAP(Username As String) As String
  20.     Dim objConnection As Object
  21.     Set objConnection = CreateObject("ADODB.Connection")
  22.     objConnection.Open "Provider=ADsDSOObject;"
  23.     Dim objCommand As Object
  24.     Set objCommand = CreateObject("ADODB.Command")
  25.     objCommand.ActiveConnection = objConnection
  26.     objCommand.CommandText = "<LDAP://OU=Users,OU=495,OU=ESTR,DC=emea,DC=corpdir,DC=net>;(&( objectclass=user)(sAMAccountName=" & Username & "));mail;subtree"
  27.     Dim objRecordSet As Object
  28.     Set objRecordSet = objCommand.Execute
  29.     On Error Resume Next
  30.     GetMailFromLDAP = objRecordSet.Fields("mail")
  31. End Function
  32.  
  33. ' Me.Email_Antragsteller.Value = GetMailFromLDAP(Me!UserID_Antragsteller)
  34. ' Me.Telefon_Antragsteller.Value = GetPhoneFromLDAP(Me!UserID_Antragsteller)
  35.