| @@ 44-62 (lines=19) @@ | ||
| 41 | $this->login( $this->_username, $this->_password ); |
|
| 42 | } |
|
| 43 | ||
| 44 | public function login(string $username, string $password,string $idSite=''): bool{ |
|
| 45 | $this->_logged = false; |
|
| 46 | if (isNullOrEmpty( $username ) || isNullOrEmpty( $password )) { |
|
| 47 | ||
| 48 | return false; |
|
| 49 | } |
|
| 50 | $this->_username = $username; |
|
| 51 | $this->_password = $password; |
|
| 52 | $credentials = array(); |
|
| 53 | $credentials["user"] = $this->_username; |
|
| 54 | $credentials["password"] = $this->_password; |
|
| 55 | $this->_network->login($credentials); |
|
| 56 | if ($this->_network->checkConnection()) { |
|
| 57 | $this->_logged = true; |
|
| 58 | ||
| 59 | } |
|
| 60 | ||
| 61 | return $this->_logged; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @return bool |
|
| @@ 44-64 (lines=21) @@ | ||
| 41 | $this->login( $this->_username, $this->_password ); |
|
| 42 | } |
|
| 43 | ||
| 44 | public function login(string $username, string $password,string $idSite=''): bool |
|
| 45 | { |
|
| 46 | $this->_logged = false; |
|
| 47 | if (isNullOrEmpty( $username ) || isNullOrEmpty( $password )) { |
|
| 48 | ||
| 49 | return false; |
|
| 50 | } |
|
| 51 | $this->_username = $username; |
|
| 52 | $this->_password = $password; |
|
| 53 | $credentials = array(); |
|
| 54 | $credentials["user"] = $this->_username; |
|
| 55 | $credentials["password"] = $this->_password; |
|
| 56 | $this->_network->login( $credentials ); |
|
| 57 | ||
| 58 | if ($this->_network->checkConnection()) { |
|
| 59 | $this->_logged = true; |
|
| 60 | ||
| 61 | } |
|
| 62 | ||
| 63 | return $this->_logged; |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @return bool |
|
| @@ 47-64 (lines=18) @@ | ||
| 44 | $this->login( $this->_username, $this->_password ); |
|
| 45 | } |
|
| 46 | ||
| 47 | public function login(string $username, string $password,string $idSite=''): bool{ |
|
| 48 | $this->_logged = false; |
|
| 49 | if (isNullOrEmpty( $username ) || isNullOrEmpty( $password )) { |
|
| 50 | ||
| 51 | return false; |
|
| 52 | } |
|
| 53 | $this->_username = $username; |
|
| 54 | $this->_password = $password; |
|
| 55 | $credentials = array(); |
|
| 56 | $credentials["user"] = $this->_username; |
|
| 57 | $credentials["password"] = $this->_password; |
|
| 58 | $this->_network->login($credentials); |
|
| 59 | if ($this->_network->checkConnection()) { |
|
| 60 | $this->_logged = true; |
|
| 61 | } |
|
| 62 | ||
| 63 | return $this->_logged; |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @return bool |
|