Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Registering a user automatically in cakephp

Tags:

cakephp

Is it possible in cakephp that a user be registered automatically with a predefined set of inputs (username, password and all that...) provided by the programmer.?

I want to register a user automatically whenever he tries to enter/access a member's restricted area.

Please help me achieve this functionality.

Using cakephp v1.2, xampp

Thanks...

like image 733
Gaurav Sharma Avatar asked Nov 22 '25 01:11

Gaurav Sharma


1 Answers

:)

Found the answer, :)

I simply assigned

'$this->data'

some values by myself like this

$this->data['User']['password'] = "test";
$this->data['User']['email'] = "[email protected]";
$this->data['User']['password'] = "Registered";

and then the add action did it's work accordingly..

like image 140
Gaurav Sharma Avatar answered Nov 24 '25 22:11

Gaurav Sharma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!