Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Radius.php
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ public function decodeVendorSpecificContent($rawValue)
* @param string $username Username to authenticate as
* @param string $password Password to authenticate with using PAP
* @param int $timeout The timeout (in seconds) to wait for a response packet
* @param string $state The state of the request (default is Service-Type=1)
* @param string $state The state of the request (default is Service-Type=1 unless already set)
* @return boolean true if the server sent an Access-Accept packet, false otherwise
*/
public function accessRequest($username = '', $password = '', $timeout = 0, $state = null)
Expand All @@ -1701,7 +1701,9 @@ public function accessRequest($username = '', $password = '', $timeout = 0, $sta
if ($state !== null) {
$this->setAttribute(24, $state);
} else {
$this->setAttribute(6, 1); // 1=Login
if ($this->getAttributesToSend(6) === null) {
$this->setAttribute(6, 1); // 1=Login
}
}

if (intval($timeout) > 0) {
Expand Down