finely LOWER(username) used in get_field() return an error: LOWER(username) is used as a column name
so i used get_field_sql() and it works
get_field('usr', 'id', 'LOWER(username)', $slev);
If it's the current user you need it for, you can just use the $USER object.
i'm trying to get id'user when a query is made with the username
i use this : $sql = get_field('usr', 'id','username',$slev );
but it's seems to be case sensitive for the username. does a function exist to do this but case insensitive?
Thanks
Maxime