Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function getUserList()
- {
- return $user = [
- [
- 'id' => 66,
- 'username' => 'gigi',
- 'password' => 'coco',
- ],
- [
- 'id' => 67,
- 'username' => 'coco',
- 'password' => 'gigi',
- ],
- ];
- }
- function getUserByUserPass($username, $pass)
- {
- $userList = getUserList();
- foreach($userList as $user)
- {
- if($username == $user['username'] && $pass == $user['password'])
- {
- return $user;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement