X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fcontrollers%2Fcatalog.php;h=da3548a617ffed7fc4acd4e837e63c1e1609b02e;hb=2881d1393f363efd3c5f0e9b58706e6e35e85717;hp=28063eea707fb34cc6d727b473cdf0ae306b6c20;hpb=ada355332b092d2bd0ec7845f62c307587c9aab0;p=living-lab-site.git diff --git a/application/controllers/catalog.php b/application/controllers/catalog.php index 28063ee..da3548a 100644 --- a/application/controllers/catalog.php +++ b/application/controllers/catalog.php @@ -71,13 +71,13 @@ class Catalog extends CI_Controller { public function test() { - $q = $this->input->get('q'); - $q = ($q ? $q : 'nimic'); - - $w = $this->input->get('w'); - $w = ($w ? $w : 'nimic'); - - echo "$q / $w"; + $data['email'] = 'CA-LăIN$*(_3@GMAIL.COM'; + $data['email'] = strtolower($data['email']); + $data['username'] = substr($data['email'], + 0, strpos($data['email'], '@')); + $data['username'] = preg_replace(array('/[^a-z0-9\._]*/'), + array(''), $data['username']); + echo $data['username']; } public function category($category_name, $ordering = 'hottest', $offset = 0)