Validate Password from Username
#1
I really want to use the function validate_password_from_username() in my plugin, but it's not working:

Quote:Fatal error: Uncaught Error: Call to undefined function validate_password_from_username() in C:\xampp\htdocs\mybb\inc\plugins\swgauth.php:27

Should I be including inc/functions_user.php in my plugin? Or is there some other function or method I should be using?
I've been searching but I haven't found the solution yet...
Reply
#2
(2020-04-09, 09:06 PM)Xalysis Wrote: Should I be including inc/functions_user.php in my plugin? Or is there some other function or method I should be using?
I've been searching but I haven't found the solution yet...

I think so, take a look at how the login system works. The file is included basically at the beginning of the member.php file.
https://github.com/mybb/mybb/blob/featur...er.php#L32
Reply
#3
(2020-04-10, 12:59 AM)Omar G. Wrote: I think so, take a look at how the login system works. The file is included basically at the beginning of the member.php file.
https://github.com/mybb/mybb/blob/featur...er.php#L32

I'll have a look, thanks. I just wasn't sure if it's safe to include these files in a plugin or if the mybb core should be including them already or if there's some other method that would already be available to a plugin. This is my first shot at a mybb plugin. I'm more accustomed to writing wordpress plugins, and some of the expectations seem a little different.

Edit: Simply including functions_user.php in my plugin seems to do the trick. Hopefully it's safe! Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)