Esempio n. 1
0
 protected function createLoginFromData(\stdClass $loginData)
 {
     $login = new Login();
     $login->setID($loginData->ID);
     $login->setActive($loginData->active == 1);
     $login->setConfirmed($loginData->confirmed !== null ? new \DateTime($loginData->confirmed) : null);
     $login->setEmail($loginData->email);
     $login->setLastLogin($loginData->lastlogin !== null ? new \DateTime($loginData->lastlogin) : null);
     $login->setRegistered($loginData->registered !== null ? new \DateTime($loginData->registered) : null);
     $login->setToken($loginData->token);
     $login->setTokenTime($loginData->tokentime);
     $login->setUsername($loginData->username);
     $login->setWrongLogins($loginData->wronglogins);
     $login->setSalt($loginData->salt);
     $login->setPassword($loginData->password);
     return $login;
 }