本文整理汇总了PHP中Converter::object_to_array方法的典型用法代码示例。如果您正苦于以下问题:PHP Converter::object_to_array方法的具体用法?PHP Converter::object_to_array怎么用?PHP Converter::object_to_array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Converter
的用法示例。
在下文中一共展示了Converter::object_to_array方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authenticate
public function authenticate()
{
$session = new Zend_Session_Namespace("LeadsChat_Owner_Auth");
$username = $this->_request->getPost("username");
$password = $this->_request->getPost("password");
$rememberMe = $this->_request->getPost("remember_me");
try {
$this->_auth->setTableName("owners")->setIdentity($username)->setCredential($password)->setCredentialTreatment("MD5(?) AND activated = 'Y' AND approved = 'Y'");
$authResult = $this->_auth->authenticate();
if ($authResult->isValid()) {
$owner = $this->_auth->getResultRowObject(null, "password");
$owner = Converter::object_to_array($owner);
$session->owner_id = $owner["owner_id"];
$session->owner = $owner;
$dataToLog["owner_name"] = $owner["first_name"] . " " . $owner["last_name"];
$dataToLog["owner_id"] = $owner["owner_id"];
Mongo_Logger::logEvent($dataToLog, Mongo_Logs_LogFactory::LoginOwner, Mongo_Interface::LOGS);
if ($rememberMe) {
$cookie = new Zend_Http_Cookie("userid", $sessionAgent->owner_id, $_SERVER["SERVER_NAME"]);
}
return true;
} else {
return false;
}
} catch (Exception $e) {
return false;
}
}