I have in my User model a function "findWithEmailOrBenutzername($data)"
and it returns the user. Now when i try to get the user from a Controller for example like $user = $User::findWithEmailOrBenutzername($data); i get the message "Non-static method, User::findWithEmailOrBenutzername() should not be called statically, assuming $this from incompatible context ".
When you use Model::method() is called a static method. So the method should read:
public static function method()
In your case either add the static key word or inject the model in your controller function. Then call it like: $model->method().
If this is confusing you need a bit more reading on static and non-static methods. In OOP it is a basic level.