Closed leankarlo closed 10 years ago
here is my model <?php class Patient extends Eloquent {
protected $table = 'patients';
} ?>
never mind I saw my mistake. I used varchar55
How to solve this problem ?
config/app.php
'providers' => array(
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
"Ollieread\Multiauth\MultiauthServiceProvider",
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Session\CommandsServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Routing\ControllerServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Html\HtmlServiceProvider',
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'Illuminate\Remote\RemoteServiceProvider',
'Illuminate\Database\SeedServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Workbench\WorkbenchServiceProvider',
),
return array(
'multi' => array(
'account' => array(
'driver' => 'eloquent',
'model' => 'Admin'
),
'admin' => array(
'driver' => 'database',
'table' => 'admin'
)
)
);
controller _--------------- Auth::account()->attempt(array( 'username' => $attributes['username'], 'password' => $attributes['password'], )); Auth::admin()->attempt(array( 'username' => $attributes['username'], 'password' => $attributes['password'], )); $a = Auth::account()->check(); $b = Auth::admin()->check(); var_dump($b); exit;
ALWAYS FLASE ...
I solve this by changing the size of the db password character. I initially inputed varchar(55) instead of varchar (255)
Lean Karlo U. Corpuz +63 2 9178625511 leankarlo_21@yahoo.com | leankarlo@gmail.com 2399 Belarmino St. Brgy Bangkal Makati City Follow me on:
Hello Karlo, I try to change the size of password and username but still returning false
2014-07-24 18:21 GMT+03:00 Lean Karlo Corpuz notifications@github.com:
I solve this by changing the size of the db password character. I initially inputed varchar(55) instead of varchar (255)
Lean Karlo U. Corpuz +63 2 9178625511 leankarlo_21@yahoo.com | leankarlo@gmail.com 2399 Belarmino St. Brgy Bangkal Makati City Follow me on:
— Reply to this email directly or view it on GitHub https://github.com/ollieread/multiauth/issues/31#issuecomment-50032783.
Hi
How come it always returns false. below are my code.
auth.php <?php return array( 'multi' => array( 'patient' => array( 'driver' => 'database', 'table' => 'patients' ), 'doctor' => array( 'driver' => 'database', 'table' => 'doctors' ) ), 'reminder' => array( 'email' => 'emails.auth.reminder', 'table' => 'password_reminders', 'expire' => 60, ), );
LoginController.php
$userdata = array( 'email' => $input['Email'], 'password' => $input['Password'], ); if (Auth::patient()->attempt($userdata,true)) { $view = Redirect::to('patients'); return $view; } else { return Redirect::to('/')->withErrors('Incorrect Email or Password')->withInput(); }
app.php
'providers' => array(