PMA\libraries\plugins\auth\AuthenticationCookie::storePasswordCookie PHP Method

storePasswordCookie() public method

Stores password in a cookie.
public storePasswordCookie ( string $password ) : void
$password string Password
return void
    public function storePasswordCookie($password)
    {
        $payload = array('password' => $password);
        if ($GLOBALS['cfg']['AllowArbitraryServer'] && !empty($GLOBALS['pma_auth_server'])) {
            $payload['server'] = $GLOBALS['pma_auth_server'];
        }
        // Duration = as configured
        $GLOBALS['PMA_Config']->setCookie('pmaAuth-' . $GLOBALS['server'], $this->cookieEncrypt(json_encode($payload), $this->_getSessionEncryptionSecret()), null, $GLOBALS['cfg']['LoginCookieStore']);
    }