Community Auth Learning... |
Now my admin/login method works fine now.
I can now login through it. But the new problem is when I login using an invalid password it redirect me to the front/login method which is the public login page of the website. How do I make it show the error on the same admin/login page? By the way here is the codes in my admin/login method. Code: public function login() thanks in advance.
Currently the recover the username or password is not sending an actual email verification message.
What settings to make it send the actual email? Or should I code this manually? What method class/method this feature resides? still digging the codes...
Just an update for the admin/admin/login
it's working fine now both on invalid password or valid password. @skunkbad here you can try this, username: iridion9 password: Retinitis9 front/public login http://beautiful-dates.com/ci/login?redirect= admin login http://beautiful-dates.com/ci/admin/admin/login The problem I need to fix is how to send the actual email for username/password recovery. Is there a settings in the config I should tweak for this? thanks in advance. (11-24-2015, 12:29 AM)solidcodes Wrote: Just an update for the admin/admin/login The example controller doesn't add the email functionality, but adding it is pretty easy. You would just change some lines. For instance, in the Examples controller on line 301 you see where the special link is created. Now just put that in an email to the user. Something like this is what I used: PHP Code: // Send recovery email At least in this case you are not going to have Email::quick_email, but you would just send an email using CI the way it shows in the CI user guide.
solidcodes, this takes a little tweaking. So for instance let's say I have an admin login at examples/alt_login:
config/authentication.php PHP Code: $config['allowed_pages_for_login'] = array( controllers/Examples.php PHP Code: public function alt_login() _redirect_to_login_page method in core/Auth_controller.php is changed slightly: PHP Code: // No need to redirect to the login form if alternate login page setup_login_form method in core/Auth_controller.php is changed slightly: PHP Code: // Login URL may be an alternate So because you already have your admin login form, you'll probably just need to change the methods in Auth_controller.php. I had never expected this kind of usage, and honestly it is a little strange for me to wrap my head around. I think it is better to use Community Auth as it was intended to be used, so such changes will probably not be put into Community Auth, unless other feedback shows that it is likely to be a feature that more people will want. I hope this helps you.
Having a separate admin login page is very common, remember wordpress?
It has separate login page for the administrator. But anyway thanks wiil try to follow your instruction. (11-29-2015, 02:43 AM)solidcodes Wrote: Having a separate admin login page is very common, remember wordpress? Having thought about it a little more, there might be another way to do what you want to do. I was thinking that it would be possible to define LOGIN_PAGE in the auth_constants.php hook dynamically, falling back on the standard login page. It is funny that I've used WordPress a lot, and never noticed it had more than one login page. I'll have to check that out.
It's fine we are only humans we make mistakes.
Is not it this is the purpose of versioning the software to fix, update and upgrade the features. By the way I think I found a bug. Yesterday the system community-auth works fine without any error. But this morning It display this error message. Code: A PHP Error was encountered So how do I fix that? thanks |
Welcome Guest, Not a member yet? Register Sign In |