- Member | 21
I have more or less dumb question.
I have following piece of code in signInFormSucceeded method (almost default SignPresenter.php):
$this->getUser()->login($values->username, $values->username); $this->user->Identity->username = 'foo';
but in debuger I get this message:
Creating default object from empty value
what should I do to be able to create custom properties of Identity?
EDIT: nette 2.2.2, using UserManager. New to PHP, new to Nette.
Today I found I can use “$user->getIdentity()->/database_column_name/”. Can I add some extraordinary object to Identity->Data? How?
Last edited by ydenda (2014-08-21 21:17)
- Member | 118
- identity should start with lowercase i, you can use
- you should build your identity inside the authenticator – build a custom authenticator, returning your implementation of Nette\Security\IIdentity with your desired custom properties. See https://doc.nette.org/…cess-control#…