When executing this following code on my website
$login = $this->cookies->get('login');
$loggedinas = $login->getValue();
$user = Users::findFirst("username = '" . $loggedinas . "'");
The following error is thrown at me:
PhalconException: Scanning error before 'pentacore...' when parsing: SELECT [Users].* FROM [Users] WHERE username = 'pentacore (89)
And i cant really seem to get my head around it, The code snippet worked in another Controller, but not here.
Any ideas?