本文整理汇总了PHP中Manager::logMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::logMessage方法的具体用法?PHP Manager::logMessage怎么用?PHP Manager::logMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager::logMessage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authenticate
/**
* Verifica se a senha fornecida por um usuário é válida
* utilizando autenticação challenge-response.
*
* @param int $userId
* @param string $challenge
* @param string $response
* @return boolean
*/
public function authenticate($userId, $challenge, $response)
{
Manager::logMessage("[LOGIN] Authenticating {$userId} LdapMD5");
$login = NULL;
try {
if ($this->validate($userId, $challenge, $response)) {
$user = Manager::getModelMAD('user');
$user->getByLogin($userId);
$profile = $user->getProfileAtual();
$user->getByProfile($profile);
$login = new MLogin($user);
if (Manager::getOptions("dbsession")) {
$session = Manager::getModelMAD('session');
$session->lastAccess($login);
$session->registerIn($login);
}
$this->setLogin($login);
$this->setLoginLogUserId($user->getId());
$this->setLoginLog($login->getLogin());
Manager::logMessage("[LOGIN] Authenticated {$userId} LdapMD5");
return true;
}
} catch (Exception $e) {
Manager::logMessage("[LOGIN] {$userId} NOT Authenticated LdapMD5 - " . $e->getMessage());
}
Manager::logMessage("[LOGIN] {$userId} NOT Authenticated LdapMD5");
return false;
}
示例2: checkLogin
public function checkLogin()
{
Manager::logMessage('[LOGIN] Running CheckLogin');
// if not checking logins, we are done
if (!MUtil::getBooleanValue(Manager::$conf['login']['check'])) {
Manager::logMessage('[LOGIN] I am not checking login today...');
return true;
}
// we have a session login?
$session = Manager::getSession();
$login = $session->getValue('__sessionLogin');
$loginMiolo = $_SESSION['login'];
// Miolo compatibility
if ($loginMiolo) {
if (is_null($login)) {
// se ainda não tem login no Maestro...
$user = Manager::getModelMAD('user');
$user->getByLogin($loginMiolo->id);
$profile = $user->getProfileAtual();
$user->getByProfile($profile);
$login = new MLogin($user);
$this->setLogin($login);
Manager::logMessage("[LOGIN] Authenticated {$loginMiolo->idkey} from Miolo");
}
}
if ($login) {
if ($login->getLogin()) {
Manager::logMessage('[LOGIN] Using session login: ' . $login->getLogin());
$this->setLogin($login);
return true;
}
}
// if we have already a login, assume it is valid and return
if ($this->login instanceof MLogin) {
Manager::logMessage('[LOGIN] Using existing login:' . $this->login->getLogin());
return true;
}
Manager::logMessage('[LOGIN] No Login but Login required!');
return false;
}
示例3: invokeService
public function invokeService($app, $module, $controllerAction)
{
Manager::logMessage("[FrontController::invokeService {$app}:{$module}:{$controllerAction}]");
list($class, $action) = explode('.', $controllerAction);
$this->controller = $controller = Manager::getService($app, $module, $class);
$controller->setParams($this->getData());
$controller->setData();
$controller->init();
$controller->dispatch($action);
}