<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext">Hi Jules,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext">Thanks for the response. This is just a quick follow-up to this for anyone wishing to do the same. There’s actually a quite elegant solution tucked away here
because of the design of the application (thanks again Jules).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext">If you create a new Authenticator that extends the NSSADAuthenticator you can accomplish this rather easily. See a rough example below.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext">Then you just change the authenticator from “AD” to “MyCustomAD” in your preferences file.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"><?php<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext">require_once(‘NSSADAuthenticator.php’);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext">class NSSMyCustomADAuthenticator extends NSSADAuthenticator<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext">public function Tryvalid($uname, &$response)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> $result = parent::Tryvalid($uname, $response);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> //Do your change to $response array items<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> //ex. $response[‘mail’] = $response[‘someOtherAttribute’];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> return $result;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> public function Tryauthenticate($uname, $password, &$response)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> $result = parent::Tryauthenticate($uname, $password, $response);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> // Do the change as above<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> return $result;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:windowtext">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><b><span lang="EN-CA" style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-CA">Mike Koza</span></b><span lang="EN-CA" style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-CA" style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-CA">Drupal Developer, I&ITS Web Technology Services<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-CA">University of Toronto Mississauga<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-CA">Service Desk: (905) 828 5344<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> zendto-bounces@zend.to [mailto:zendto-bounces@zend.to]
<b>On Behalf Of </b>Jules<br>
<b>Sent:</b> Friday, February 03, 2017 10:44 AM<br>
<b>To:</b> ZendTo Users<br>
<b>Subject:</b> Re: [ZendTo] Use different AD attribute<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Brian,<br>
<br>
The simplest way for you to do this is probably a minor tweak to the code for the AD authenticator.<br>
This is in the file<br>
/opt/zendto/lib/NSSADAuthenticator.php<br>
<br>
If you edit that file, you should find *2* occurrences of a line that says this:<br>
$response['organization'] = $this->_ldapOrg;<br>
<br>
In both places, you could just add a line immediately below it that overwrites the 'mail' attribute's value with whatever attribute's value you want to use instead. So for example, if you wanted to use the 'electronicmail' attribute instead, the extra line
in both cases would be<br>
$response['mail'] = $response['electronicmail'];<br>
<br>
However, do bear in mind that your change will be overwritten when you upgrade the rpm/deb of the ZendTo package, so you would need to add that to your service documentation.<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 03/02/2017 12:59, Brian Novogradac wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hello all,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Is there anyway to use different AD attributes to pull information that is displayed in the zendto app. I am looking primarily at the mail attribute. I would like to change that attribute to pull info from another.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Brian Novogradac<br>
<span style="background:white">Intermediate Systems Administrator</span> (I&ITS)<br>
<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;color:#333333;mso-fareast-language:EN-CA">Information Security Is Everyone’s Responsibility.</span></b><span style="font-size:10.0pt;color:#333333;mso-fareast-language:EN-CA"> Learn more:
<a href="http://uoft.me/cyberaware"><span style="color:blue">http://uoft.me/cyberaware</span></a></span><o:p></o:p></p>
<p class="MsoNormal"><br>
University of Toronto at Mississauga<br>
3359 Mississauga Road N.<br>
Mississauga, Ontario, L5L 1C6<br>
<br>
(P) 416-435-2543<br>
(F) 905-569-4343<br>
(E) <a href="mailto:brian.novogradac@utoronto.ca"><span style="color:#4472C4">brian.novogradac@utoronto.ca</span></a><o:p></o:p></p>
<p class="MsoNormal">(W) <a href="http://www.utm.utoronto.ca/iits"><span style="color:#4472C4">www.utm.utoronto.ca/iits</span></a><br>
<br>
<span style="font-size:10.0pt">This E-mail contains privileged and confidential information intended only for the individual or entity named in the message. If the reader of this message is not the intended recipient, or the agent responsible to deliver it
to the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited. If this communication was received in error, please notify the sender by reply E-mail immediately, and delete and
destroy the original message.</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>ZendTo mailing list<o:p></o:p></pre>
<pre><a href="mailto:ZendTo@zend.to">ZendTo@zend.to</a><o:p></o:p></pre>
<pre><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<br>
<o:p></o:p></span></p>
<pre>Jules<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>-- <o:p></o:p></pre>
<pre>Julian Field MEng MBCS CITP CEng<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><a href="http://www.Zend.To">www.Zend.To</a><o:p></o:p></pre>
<pre>Twitter: @JulesFM<o:p></o:p></pre>
<pre>PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654<o:p></o:p></pre>
</div>
</body>
</html>