Can I directly get the data of the user that I just logged in with craft()->userSession->login($username, $password)
? (not from a method that uses the SESSION like craft()->userSession->getUser()
though)
1 Answer
If you have the any identifying information about the user (user ID, email, username, UID), you can use one of the UsersService's methods:
craft()->users->getUserByUsernameOrEmail()
craft()->users->getUserByUid()
craft()->users->getUserByEmail()
They will each return a UserModel object to interact with.