Fixing strict PHP warnings when registering a user

Fixes #329
Merge pull request #342 from TheSerapher/issue-329

Fixing strict PHP warnings when registering a user