php - CakePHP: How to login using only barcode? -


I started learning KPHHP about the month before, so I am quite new to this and I want to ask a question:

< p> How do I use barcode only?

My plan is to log in with regular barcode for regular users only and they will have their regular username and password for admin login. I have searched many pages but I have not found any solution for this.

for example QR-code:

The login function is used in the administrator:

  if ($ this-> request-> is ('get')) {$ user = $ this-> ; User- & gt; Search ('first', array ('conditions' => gt; array ('user.name' => = this- & gt; request- & gt; query ['username'], 'user password' = & Gt; $ this- & gt; Request- & gt; query ['password'] / do not forget the hash password if I ($ user! = Null) {$ this-> AUTH- & gt; Login ( $ User); $ this- & gt; redirect ('/ admin / index');}}    

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -