本文整理汇总了PHP中Piwik\Piwik::checkValidLoginString方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::checkValidLoginString方法的具体用法?PHP Piwik::checkValidLoginString怎么用?PHP Piwik::checkValidLoginString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Piwik
的用法示例。
在下文中一共展示了Piwik::checkValidLoginString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
static function update($schema = 'Myisam')
{
$config = Config::getInstance();
$rootLogin = $config->superuser['login'];
try {
// throws an exception if invalid
Piwik::checkValidLoginString($rootLogin);
} catch (\Exception $e) {
throw new \Exception('Superuser login name "' . $rootLogin . '" is no longer a valid format. ' . $e->getMessage() . ' Edit your config/config.ini.php to change it.');
}
}
示例2: validateOwner
function validateOwner()
{
try {
$login = $this->owner->getValue();
if (!empty($login)) {
Piwik::checkValidLoginString($login);
}
} catch (\Exception $e) {
$this->setMessage($e->getMessage());
return false;
}
return true;
}
示例3: doUpdate
public function doUpdate(Updater $updater)
{
$config = Config::getInstance();
try {
$superuser = $config->superuser;
} catch (\Exception $e) {
return;
}
if (empty($superuser['login'])) {
return;
}
$rootLogin = $superuser['login'];
try {
// throws an exception if invalid
Piwik::checkValidLoginString($rootLogin);
} catch (\Exception $e) {
throw new \Exception('Superuser login name "' . $rootLogin . '" is no longer a valid format. ' . $e->getMessage() . ' Edit your config/config.ini.php to change it.');
}
}
示例4: testCheckValidLoginString
/**
* @dataProvider getValidLoginStringData
*/
public function testCheckValidLoginString($toTest)
{
$this->assertNull(Piwik::checkValidLoginString($toTest));
}
示例5: checkLogin
private function checkLogin($userLogin)
{
if ($this->userExists($userLogin)) {
throw new Exception(Piwik::translate('UsersManager_ExceptionLoginExists', $userLogin));
}
Piwik::checkValidLoginString($userLogin);
}