Hi Martin,
I dont believe this is php related but rather elgg related. I posted a blog on their site as follows
"I have an elgg install and will be using LDAP usernames although I have not at this point installed LDAP on the elgg module.
Many of my users have the number 0 at the start and it disappears in the db and user profile from the admin menu. Is there anyway to allow the number 0 to be valid iat the start of a username?
eg 0111111 is returned as 111111 although the 01111111 allows login but is not supported in the db or the admin management. "
Moodle quite gracefully accepts the 0 at the start of the username and elgg doesn't which i believe is the root of the problem. I don't know how to fix it. All of my other users that start with a letter character or any other number are OK. This all seems to be beahviour that I have seen in excel on non preformatted lists before.
This is the final hurdle and I need a fix but the fix needs to come from elgg.
Any ideas?