You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LuticateUsersLightDbo.php 614B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: robin
  5. * Date: 10/9/15
  6. * Time: 2:35 PM
  7. */
  8. namespace Luticate\Auth\DBO;
  9. class LuticateUsersLightDbo extends LuticateUsersDbo
  10. {
  11. /**
  12. * @param $user LuticateUsersDbo
  13. * @return LuticateUsersLoginDbo|null
  14. */
  15. public static function fromUserDbo($user)
  16. {
  17. return $user->castAs('Luticate\Auth\DBO\LuticateUsersLightDbo');
  18. }
  19. public function jsonSerialize()
  20. {
  21. $array = parent::jsonSerialize();
  22. unset($array["Password"]);
  23. unset($array["Token"]);
  24. unset($array["Salt"]);
  25. return $array;
  26. }
  27. }