Piwik\Plugins\UsersManager\UsersManager::getPasswordHash PHP Method

getPasswordHash() public static method

public static getPasswordHash ( $password )
    public static function getPasswordHash($password)
    {
        // if change here, should also edit the installation process
        // to change how the root pwd is saved in the config file
        return md5($password);
    }

Usage Example

Example #1
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage token_auth specified does not have Admin permission for idsite=1
  */
 public function test_authenticateRequests_shouldThrowAnException_IfTokenIsNotValid()
 {
     $dummyToken = API::getInstance()->getTokenAuth('test', UsersManager::getPasswordHash('2'));
     $superUserToken = $this->getSuperUserToken();
     $requests = array($this->buildDummyRequest($superUserToken), $this->buildDummyRequest($dummyToken));
     $this->requests->authenticateRequests($requests);
 }
All Usage Examples Of Piwik\Plugins\UsersManager\UsersManager::getPasswordHash