Skip to content

Commit

Permalink
Release version 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrossmann committed Aug 25, 2013
2 parents 1772af8 + 9633525 commit 38e496a
Show file tree
Hide file tree
Showing 24 changed files with 1,772 additions and 365 deletions.
38 changes: 38 additions & 0 deletions ADX/Attributes/MsExchMailboxGuid.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

/**
* AD-X
*
* Licensed under the BSD (3-Clause) license
* For full copyright and license information, please see the LICENSE file
*
* @copyright 2012-2013 Robert Rossmann
* @author Robert Rossmann <[email protected]>
* @link https://github.com/Alaneor/AD-X
* @license http:https://choosealicense.com/licenses/bsd-3-clause BSD (3-Clause) License
*/

namespace ADX\Attributes;

/**
* Overrides the msExchMailboxGuid attribute behaviour
*
* This class provides special functionality when converting the raw data into ldap-compatible value.
* The problem is that ldap refuses to accept a hex string as an input for writing into this attribute -
* it has to be converted to a binary string.
*/
class MsExchMailboxGuid extends \ADX\Core\Attribute
{
/**
* Convert the raw ldap data into binary string instead of keeping it as hexadecimal value
*
* @return array The data in binary format
*/
public function ldap_data()
{
$data = parent::ldap_data();
$data = str_ireplace( '\\', '', $data[0] );

return [hex2bin( $data )];
}
}
Loading

0 comments on commit 38e496a

Please sign in to comment.