-
Notifications
You must be signed in to change notification settings - Fork 235
9) Error and Info Messages
Error mesages are used to warn user when someting went wrong. Aauth supports built-in errors and user-defined errors.
For example if you are trying yo send pm to yourself, you will get an error. But this errors will not stop executing script.
Another example; if you try to create a group which already created before, you will take "Group exist" error.
The most useful case is logining and registering. If user is entered wrong informations such as short password, unvalid email or unvalid character, you will get error array which consist of all errors.
You can change error messages from Aauth Config file.
Errors are flash data (look Codeigniter sessions). It is only available until next server request.
There is also another option for warnings
simply you can create your own error message.
$this->aauth->error('Please fill the form');
returns all errors as an array
it prints the string which error messages divided with a divider ( default divider is new line char )
infos are same with errors, but it is user for trivial warnings for instance, in check_email() function if email is taken, it will create an info.
Aauth V2 Wiki created by emreakay.com