Advertisement
fahmihilmansyah

interaksi login

May 17th, 2018
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1.  $server = 'ldap.telkom.co.id';
  2.             $ldapResultK = Yii::$app->ldap->authenticate($server, $this->username, $this->password);
  3.             $ldapResult = '';
  4.             if($ldapResultK !== 'Login Success' ) {
  5.                 $server = 'directory.telkom.co.id';
  6.                 $ldapResultM = Yii::$app->ldap->authenticate($server, "uid=".$this->username.",ou=employees,ou=internal,cn=Users,dc=telkom,dc=co,dc=id", $this->password,3060);
  7.                 if ($ldapResultM === 'Login Success') {
  8.                     $ldapResult = 'Login Success';
  9.                 }
  10.             }else{
  11.                 $ldapResult = 'Login Success';
  12.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement