Hello!
(Running a pretty current csv of G2 on Ubuntu 10.4)
I am aparently missing the "Heureka-moment" when it comes to using the core classes.
I am looking to code a simple web-form that will execute a few functions if the user/pass combo is that of an existing gallery user.
Basically, a form with a user/pass that will see if the password matches said user name of Gallery.
I have found GalleryCoreApi.class, GalleryUtilities.Class and GalleryUser.class, but I cannot find any example on how I would do this.
I guess I am missing in particular the connection on how to fetch the hashed PW given a certain user name. Sure, I could write my own code for this... but why, when there is such a nice toolbox in place already
Any pointer?
Posts: 8339
GalleryCoreApi.class
fetchUserByUserName
GalleryUser.class
getHashedPassword
isCorrectPassword
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 8339
example usage:
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 37
Thanks... But now quite right aparently(?)
Fatal error: Call to a member function search() on a non-object in /var/www/clients/client1/web13/web/gallery2/modules/core/classes/helpers/GalleryUserHelper_medium.class on line 137
<?php
error_reporting ( E_ALL );
ini_set ( 'display_errors', '1' );
require_once '/var/www/gallerimaster.skyddsrummet.net/web/gallery2/modules/core/classes/GalleryCoreApi.class';
require_once '/var/www/gallerimaster.skyddsrummet.net/web/gallery2/modules/core/classes/GalleryUtilities.class';
require_once '/var/www/gallerimaster.skyddsrummet.net/web/gallery2/modules/core/classes/GalleryUser.class';
list($ret, $user) = GalleryCoreApi::fetchUserByUserName('janjoh');
if ($ret) {
print "Error fetching user:".$ret->getAsHtml();
exit;
}
if($user->isCorrectPassword('atestpassword')){
echo "hurray";
}else{
echo "wrong";
}
?>
Posts: 8339
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 37
AHA!
There was the Heureka-moment!
I actually had not realized that I had to use the embed-functionality. I thought that was only for actually embedding 'visual' items.
So, embedding is actually _all_ kinds of integration.
Thanks!
Posts: 8339
You can find all the "Heureka" you want in my mediaBlock or my embed tool
or mediaRss or SlideshowPro scripts ;)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2