Welcome Guest, Not a member yet? Register   Sign In
Help with check if user exist
#3

[eluser]Bankzilla[/eluser]
[quote author="ojcarga" date="1349019614"][quote author="razorsese" date="1349002467"]
The problem is when someone register it doesn't check if that name already exist in database.
[/quote]

Are you just telling us what your application does not do or are you asking something??[/quote]

Instead of being a dick you could of just easily suggested a solution.


The database library has something built in that you aren't taking advantage of yet.

Code:
is_unique[user.id]
This will go the end of your validation rule and can go in replace of your callback function.

Code:
$this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|is_unique[user.id]|xss_clean');


Messages In This Thread
Help with check if user exist - by El Forum - 09-30-2012, 03:54 AM
Help with check if user exist - by El Forum - 09-30-2012, 08:40 AM
Help with check if user exist - by El Forum - 09-30-2012, 04:09 PM
Help with check if user exist - by El Forum - 10-01-2012, 02:54 AM
Help with check if user exist - by El Forum - 10-01-2012, 04:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB