Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'Message.class.php';
- class User
- {
- private $_message_fetcher;
- private $_errors = array();
- public function __construct()
- {
- $this->_message_fetcher = new Message();
- }
- public function error_in_name( $username )
- {
- if ( !preg_match("/^[A-Za-z0-9_.]{2,8}$/", $username) )
- {
- return $this->_message_fetcher->getMessage(1,"nl");
- }
- return null;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment