If else condition not calling a function in PHP
<pre><code>if($process-&gt;g_User() &amp;&amp; $process-&gt;g_Pass()){
         if($process-&gt;LdapConn()){
             if($process-&gt;LdapBind()){

                    return 'google';

             }else{
       procLogin();
         }
     }

     }
</code></pre>

<p>If my condition fails, it must call the procLogin() function but its not calling... the ProcLogin has just an echo... </p>

<pre><code>if($process-&gt;g_User() &amp;&amp; $process-&gt;g_Pass() &amp;&amp; $process-&gt;LdapConn() 
   &amp;&amp; process-&gt;LdapBind()) {
    return 'google';
</code></pre>

<p>When using this... it does not even call the google... </p>

<p>But in my latter code, at least it was calling... </p>

<p>My Requirement is... if the username and password is wrong, then it should fail regardless the connection is established or not.</p>
